diff options
-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 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)) |