diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2016-06-22 22:20:20 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-06-22 13:24:17 -0700 |
commit | 4e1b06da252a7609f0c6641750e6acbec451e698 (patch) | |
tree | 4522faea1c57a8dcd9f0d8e4060e686245071a18 /commit.c | |
parent | 77356122443039b4b65a7795d66b3d1fdeedcce8 (diff) | |
download | git-4e1b06da252a7609f0c6641750e6acbec451e698.tar.gz |
commit.c: make find_commit_subject() more robust
Just like the pretty printing machinery, we should simply ignore
blank lines at the beginning of the commit messages.
This discrepancy was noticed when an early version of the
rebase--helper produced commit objects with more than one empty line
between the header and the commit message.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -398,7 +398,7 @@ int find_commit_subject(const char *commit_buffer, const char **subject) while (*p && (*p != '\n' || p[1] != '\n')) p++; if (*p) { - p += 2; + p = skip_blank_lines(p + 2); for (eol = p; *eol && *eol != '\n'; eol++) ; /* do nothing */ } else |