summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f2b5e7a)
raw | patch | inline | side by side (parent: f2b5e7a)
author | Michael J Gruber <git@drmicha.warpmail.net> | |
Thu, 17 Feb 2011 07:44:42 +0000 (08:44 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 17 Feb 2011 19:56:50 +0000 (11:56 -0800) |
Currently, patch-id trips over our very own diff extension for marking
the absence of newline at EOF.
Fix it. (Ignore it, it's whitespace.)
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the absence of newline at EOF.
Fix it. (Ignore it, it's whitespace.)
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/patch-id.c | patch | blob | history | |
t/t4204-patch-id.sh | patch | blob | history |
diff --git a/builtin/patch-id.c b/builtin/patch-id.c
index 512530022edac398f8541ee6c400c7312659e730..49a0472a9bd28274c4be1352996e700a1db4b94a 100644 (file)
--- a/builtin/patch-id.c
+++ b/builtin/patch-id.c
p += 7;
else if (!memcmp(line, "From ", 5))
p += 5;
+ else if (!memcmp(line, "\\ ", 2) && 12 < strlen(line))
+ continue;
if (!get_sha1_hex(p, next_sha1)) {
found_next = 1;
diff --git a/t/t4204-patch-id.sh b/t/t4204-patch-id.sh
index db96064f67a8e72ad3f33d9608f8b1d1e9894279..d2c930de87f721a0e876351e511295ae0b094108 100755 (executable)
--- a/t/t4204-patch-id.sh
+++ b/t/t4204-patch-id.sh
+b
EOF
-test_expect_failure 'patch-id handles no-nl-at-eof markers' '
+test_expect_success 'patch-id handles no-nl-at-eof markers' '
cat nonl | calc_patch_id nonl &&
cat withnl | calc_patch_id withnl &&
test_cmp patch-id_nonl patch-id_withnl