summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bca7325)
raw | patch | inline | side by side (parent: bca7325)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 10 Dec 2006 23:51:54 +0000 (15:51 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 11 Dec 2006 22:12:33 +0000 (14:12 -0800) |
The old code looked backwards from the email address to parse
the name, allowing an arbitrary number of spaces between the
two. However, in the case of no name, we looked back too far to
the 'author' (or 'Author:') header.
The bug was triggered by commit febf7ea4bed from linux-2.6.
Jeff King originally fixed it by looking back only one
character; Johannes Schindelin pointed out that we could try
harder while at it to cope with commits with broken headers.
Signed-off-by: Junio C Hamano <junkio@cox.net>
the name, allowing an arbitrary number of spaces between the
two. However, in the case of no name, we looked back too far to
the 'author' (or 'Author:') header.
The bug was triggered by commit febf7ea4bed from linux-2.6.
Jeff King originally fixed it by looking back only one
character; Johannes Schindelin pointed out that we could try
harder while at it to cope with commits with broken headers.
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-shortlog.c | patch | blob | history |
diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index 3322c3a2eef3f331ea716690039c8b38bf4a6fd0..3fc43dd7dd89fea2fb7f02e694ed632215002e13 100644 (file)
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
bob = buffer + strlen(buffer);
else {
offset = 8;
- if (isspace(bob[-1]))
+ while (buffer + offset < bob &&
+ isspace(bob[-1]))
bob--;
}