Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-03-11 10:37:38 +0300
committerJunio C Hamano <gitster@pobox.com>2008-03-11 10:37:38 +0300
commitb50396d16cb687eccb2c2c9160b30f17e20a543f (patch)
tree4e70bee79d4c36810b8f60034e5c53fe66aea560
parent5b10a3c12439b262ccebb528a2db3945e7ebd061 (diff)
parentc1ce83a5b64618a8a4ac313da82c156558cbe259 (diff)
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 fa8bc7d02a..f08095bc91 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))