diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-03-08 13:23:42 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-03-08 13:23:42 +0300 |
commit | 5c9afcff1aa048abf95296231d51fa481304a735 (patch) | |
tree | 44fabdca14aeacb74b61195c194ee33e43e6e1a2 | |
parent | 60e3cad92ed93120b9e77116163b267fdda44f91 (diff) | |
parent | c1ce83a5b64618a8a4ac313da82c156558cbe259 (diff) |
Merge branch 'aw/maint-shortlog-blank-lines'
* aw/maint-shortlog-blank-lines:
shortlog: take the first populated line of the description
-rw-r--r-- | builtin-shortlog.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin-shortlog.c b/builtin-shortlog.c index af31abaaf8..b22b0edd65 100644 --- 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)) |