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-08 13:23:42 +0300
committerJunio C Hamano <gitster@pobox.com>2008-03-08 13:23:42 +0300
commit5c9afcff1aa048abf95296231d51fa481304a735 (patch)
tree44fabdca14aeacb74b61195c194ee33e43e6e1a2 /builtin-shortlog.c
parent60e3cad92ed93120b9e77116163b267fdda44f91 (diff)
parentc1ce83a5b64618a8a4ac313da82c156558cbe259 (diff)
Merge branch 'aw/maint-shortlog-blank-lines'
* aw/maint-shortlog-blank-lines: shortlog: take the first populated line of the description
Diffstat (limited to 'builtin-shortlog.c')
-rw-r--r--builtin-shortlog.c5
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))