summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 62b339a)
raw | patch | inline | side by side (parent: 62b339a)
author | Jeff King <peff@peff.net> | |
Sat, 9 Dec 2006 04:04:21 +0000 (23:04 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 9 Dec 2006 04:11:21 +0000 (20:11 -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.
Instead, remove at most one space between name and address.
The bug was triggered by commit febf7ea4bed from linux-2.6.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
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.
Instead, remove at most one space between name and address.
The bug was triggered by commit febf7ea4bed from linux-2.6.
Signed-off-by: Jeff King <peff@peff.net>
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 f1124e261b04ca93118c662f391dec41d9ee9713..7a2ddfe7971cc4dabacaf7fe87738fa5aa13da16 100644 (file)
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
bob = buffer + strlen(buffer);
else {
offset = 8;
- while (isspace(bob[-1]))
+ if (isspace(bob[-1]))
bob--;
}
author = scratch;
authorlen = strlen(scratch);
} else {
- while (bracket[-1] == ' ')
+ if (bracket[-1] == ' ')
bracket--;
author = buffer + 7;