summaryrefslogtreecommitdiff
path: root/patch-id.c
diff options
context:
space:
mode:
authorKai Ruemmler <kai.ruemmler@gmx.net>2005-10-09 16:52:50 -0700
committerJunio C Hamano <junkio@cox.net>2005-10-09 16:52:50 -0700
commit9fabdedc0edd4ff150197a53cc3032e7bf27c4d4 (patch)
treea62823e67542b7a8fa0ad5d6638387573ae3d194 /patch-id.c
parent5a6850e8aae7c6ef4f22e07cb620eb9325543732 (diff)
downloadgit-9fabdedc0edd4ff150197a53cc3032e7bf27c4d4.tar.gz
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 <kai.ruemmler@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'patch-id.c')
-rw-r--r--patch-id.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/patch-id.c b/patch-id.c
index 5a8dc75d0e..960e7cedf9 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;