summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-09-30 09:40:15 -0700
committerVicent Martí <vicent@github.com>2013-09-30 09:40:15 -0700
commit5b09db15d1041032c446f6141a9b41265fb253bc (patch)
tree69dea769759376e34b3bac7bef229982e2288cbc /src/commit.c
parente6a1d9a24889052ad2d573d90ffe3f6527863079 (diff)
parentd27a441ddefff8934e43a546b23f582437ba4399 (diff)
downloadlibgit2-5b09db15d1041032c446f6141a9b41265fb253bc.tar.gz
Merge pull request #1883 from libgit2/ntk/fix/empty_first_commit_line
Remove leading newlines from commit message
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commit.c b/src/commit.c
index 15a195fe5..ab475a8f8 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -240,7 +240,7 @@ int git_commit__parse(void *_commit, git_odb_object *odb_obj)
buffer_end = buffer + git_odb_object_size(odb_obj);
buffer += header_len;
- if (*buffer == '\n')
+ while (buffer < buffer_end && *buffer == '\n')
++buffer;
/* extract commit message */