From: Kai Ruemmler Date: Sun, 9 Oct 2005 23:52:50 +0000 (-0700) Subject: ignore new git-diff index header when computing patch ids X-Git-Tag: v0.99.8c~1^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9fabdedc0edd4ff150197a53cc3032e7bf27c4d4;p=git.git ignore new git-diff index header when computing patch ids Two else equal patches should not result in different checksums, only because they were applied to different versions of the file. Signed-off-by: Kai Ruemmler Signed-off-by: Junio C Hamano --- diff --git a/patch-id.c b/patch-id.c index 5a8dc75d..960e7ced 100644 --- a/patch-id.c +++ b/patch-id.c @@ -55,6 +55,10 @@ static void generate_id_list(void) if (!patchlen && memcmp(line, "diff ", 5)) continue; + /* Ignore git-diff index header */ + if (!memcmp(line, "index ", 6)) + continue; + /* Ignore line numbers when computing the SHA1 of the patch */ if (!memcmp(line, "@@ -", 4)) continue;