From 2485eab55cc0dcab34311ecd0ac52038aa9d9db4 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Thu, 17 Feb 2011 08:44:42 +0100 Subject: git-patch-id: do not trip over "no newline" markers 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 Signed-off-by: Junio C Hamano --- builtin/patch-id.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'builtin') diff --git a/builtin/patch-id.c b/builtin/patch-id.c index 512530022..49a0472a9 100644 --- a/builtin/patch-id.c +++ b/builtin/patch-id.c @@ -73,6 +73,8 @@ int get_one_patchid(unsigned char *next_sha1, git_SHA_CTX *ctx) 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; -- cgit v1.2.1