Skip to content

Commit

Permalink
Merge branch 'aw/maint-shortlog-blank-lines'
Browse files Browse the repository at this point in the history
* aw/maint-shortlog-blank-lines:
  shortlog: take the first populated line of the description
  • Loading branch information
Junio C Hamano committed Mar 8, 2008
2 parents 60e3cad + c1ce83a commit 5c9afcf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions builtin-shortlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 5c9afcf

Please sign in to comment.