diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-03-08 02:23:42 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-03-08 02:23:42 -0800 |
commit | 5c9afcff1aa048abf95296231d51fa481304a735 (patch) | |
tree | 44fabdca14aeacb74b61195c194ee33e43e6e1a2 | |
parent | Merge branch 'maint' (diff) | |
parent | shortlog: take the first populated line of the description (diff) | |
download | tgif-5c9afcff1aa048abf95296231d51fa481304a735.tar.xz |
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)) |