Skip to content

Commit

Permalink
Take binary diffs into account for "git rebase"
Browse files Browse the repository at this point in the history
We used to not generate a patch ID for binary diffs, but that means that
some commits may be skipped as being identical to already-applied diffs
when doing a rebase.

So just delete the code that skips the binary diff. At the very least,
we'd want the filenames to be part of the patch ID, but we might also want
to generate some hash for the binary diff itself too.

This fixes an issue noticed by Torgil Svensson.

Tested-by: Torgil Svensson <torgil.svensson@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Linus Torvalds authored and Junio C Hamano committed Aug 19, 2007
1 parent 1211be6 commit 2f82f76
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -2919,10 +2919,6 @@ static int diff_get_patch_id(struct diff_options *options, unsigned char *sha1)
fill_mmfile(&mf2, p->two) < 0)
return error("unable to read files to diff");

/* Maybe hash p->two? into the patch id? */
if (diff_filespec_is_binary(p->two))
continue;

len1 = remove_space(p->one->path, strlen(p->one->path));
len2 = remove_space(p->two->path, strlen(p->two->path));
if (p->one->mode == 0)
Expand Down

0 comments on commit 2f82f76

Please sign in to comment.