Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2011-02-17 10:44:42 +0300
committerJunio C Hamano <gitster@pobox.com>2011-02-17 22:56:50 +0300
commit2485eab55cc0dcab34311ecd0ac52038aa9d9db4 (patch)
tree54117a9f94e1cc0c8d2f3dbbd90bc79fd9dd5d7e /builtin/patch-id.c
parentf2b5e7af10a2d51ce300a958c32d26ec0cf6f678 (diff)
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 <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/patch-id.c')
-rw-r--r--builtin/patch-id.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/patch-id.c b/builtin/patch-id.c
index 512530022ed..49a0472a9bd 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;