提交 2f82f760 编写于 作者: L Linus Torvalds 提交者: Junio C Hamano

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: NTorgil Svensson <torgil.svensson@gmail.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 1211be6b
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册