Take binary diffs into account for "git rebase"
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>
Linus Torvalds committed
Aug 18, 2007 at 15:52 UTC
2f82f760e1b2630073a05c44fe70bdce9706d9e5
1 file changed
-4
diff.c
-4
@@ -2919,10 +2919,6 @@ static int diff_get_patch_id(struct diff_options *options, unsigned char *sha1)
2919
fill_mmfile(&mf2, p->two) < 0)
2920
return error("unable to read files to diff");
2921
2922
- /* Maybe hash p->two? into the patch id? */
2923
- if (diff_filespec_is_binary(p->two))
2924
- continue;
2925
-
2922
len1 = remove_space(p->one->path, strlen(p->one->path));
2923
len2 = remove_space(p->two->path, strlen(p->two->path));
2924
if (p->one->mode == 0)