Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'aw/maint-shortlog-blank-lines'
author
Junio C Hamano
<gitster@pobox.com>
Sat, 8 Mar 2008 10:23:42 +0000
(
02:23
-0800)
committer
Junio C Hamano
<gitster@pobox.com>
Sat, 8 Mar 2008 10:23:42 +0000
(
02:23
-0800)
* aw/maint-shortlog-blank-lines:
shortlog: take the first populated line of the description
builtin-shortlog.c
patch
|
blob
|
history
raw
(from parent 1:
60e3cad
)
diff --git
a/builtin-shortlog.c
b/builtin-shortlog.c
index af31abaaf862bb85a72e8052cf28a874d34c714a..b22b0edd65eefacabb648962b9c20c695609a3f5 100644
(file)
--- a/
builtin-shortlog.c
+++ b/
builtin-shortlog.c
@@
-70,11
+70,12
@@
static void insert_one_record(struct shortlog *log,
else
free(buffer);
+ /* Skip any leading whitespace, including any blank lines. */
+ while (*oneline && isspace(*oneline))
+ oneline++;
eol = strchr(oneline, '\n');
if (!eol)
eol = oneline + strlen(oneline);
- while (*oneline && isspace(*oneline) && *oneline != '\n')
- oneline++;
if (!prefixcmp(oneline, "[PATCH")) {
char *eob = strchr(oneline, ']');
if (eob && (!eol || eob < eol))