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:
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))