summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 73c7f5e)
raw | patch | inline | side by side (parent: 73c7f5e)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 10 Dec 2006 23:55:07 +0000 (15:55 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 11 Dec 2006 22:12:29 +0000 (14:12 -0800) |
Originally noticed by Nicolas Pitre; the real cause was the code
was prepared to deal with [PATCH] (and [PATCH n/m whatever])
prefixes but forgot that the string can be indented while acting
as a filter.
Signed-off-by: Junio C Hamano <junkio@cox.net>
was prepared to deal with [PATCH] (and [PATCH n/m whatever])
prefixes but forgot that the string can be indented while acting
as a filter.
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 7a2ddfe7971cc4dabacaf7fe87738fa5aa13da16..3322c3a2eef3f331ea716690039c8b38bf4a6fd0 100644 (file)
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
while (fgets(buffer2, sizeof(buffer2), stdin) &&
buffer2[0] != '\n')
; /* chomp input */
- if (fgets(buffer2, sizeof(buffer2), stdin))
+ if (fgets(buffer2, sizeof(buffer2), stdin)) {
+ int l2 = strlen(buffer2);
+ int i;
+ for (i = 0; i < l2; i++)
+ if (!isspace(buffer2[i]))
+ break;
insert_author_oneline(list,
buffer + offset,
bob - buffer - offset,
- buffer2, strlen(buffer2));
+ buffer2 + i, l2 - i);
+ }
}
}
}