summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-03-11 07:37:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-03-11 07:37:38 (GMT)
commitb50396d16cb687eccb2c2c9160b30f17e20a543f (patch)
tree4e70bee79d4c36810b8f60034e5c53fe66aea560
parent5b10a3c12439b262ccebb528a2db3945e7ebd061 (diff)
parentc1ce83a5b64618a8a4ac313da82c156558cbe259 (diff)
downloadgit-b50396d16cb687eccb2c2c9160b30f17e20a543f.zip
git-b50396d16cb687eccb2c2c9160b30f17e20a543f.tar.gz
git-b50396d16cb687eccb2c2c9160b30f17e20a543f.tar.bz2
Merge branch 'aw/maint-shortlog-blank-lines' into maint
* aw/maint-shortlog-blank-lines: shortlog: take the first populated line of the description
-rw-r--r--builtin-shortlog.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin-shortlog.c b/builtin-shortlog.c
index fa8bc7d..f08095b 100644
--- a/builtin-shortlog.c
+++ b/builtin-shortlog.c
@@ -74,11 +74,12 @@ static void insert_one_record(struct path_list *list,
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))