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>
Kai Ruemmler committed
Oct 9, 2005 at 16:52 UTC
9fabdedc0edd4ff150197a53cc3032e7bf27c4d4
1 file changed
+4
patch-id.c
+4
@@ -55,6 +55,10 @@ static void generate_id_list(void)
55
if (!patchlen && memcmp(line, "diff ", 5))
56
continue;
57
58
+ /* Ignore git-diff index header */
59
+ if (!memcmp(line, "index ", 6))
60
+ continue;
61
+
62
/* Ignore line numbers when computing the SHA1 of the patch */
63
if (!memcmp(line, "@@ -", 4))
64
continue;