shortlog: remove "[PATCH]" prefix from shortlog output
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>
Junio C Hamano committed
Dec 10, 2006 at 15:55 UTC
bca73251da5cc3e4bea71e28e0096a5cd662bbd9
1 file changed
+8
-2
builtin-shortlog.c
+8
-2
@@ -195,11 +195,17 @@ static void read_from_stdin(struct path_list *list)
195
while (fgets(buffer2, sizeof(buffer2), stdin) &&
196
buffer2[0] != '\n')
197
; /* chomp input */
198
- if (fgets(buffer2, sizeof(buffer2), stdin))
198
+ if (fgets(buffer2, sizeof(buffer2), stdin)) {
199
+ int l2 = strlen(buffer2);
200
+ int i;
201
+ for (i = 0; i < l2; i++)
202
+ if (!isspace(buffer2[i]))
203
+ break;
204
insert_author_oneline(list,
205
buffer + offset,
206
bob - buffer - offset,
202
- buffer2, strlen(buffer2));
207
+ buffer2 + i, l2 - i);
208
+ }
209
}
210
}
211
}