diff options
author | nulltoken <emeric.fermas@gmail.com> | 2013-09-30 11:30:28 +0200 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2013-09-30 11:33:58 +0200 |
commit | d27a441ddefff8934e43a546b23f582437ba4399 (patch) | |
tree | c87f6a7eeb53d06569b5b0db65357722e7cb4495 /src/commit.c | |
parent | 27c8eb2a1a881be12e281b606730ff15a8382ab1 (diff) | |
download | libgit2-d27a441ddefff8934e43a546b23f582437ba4399.tar.gz |
commit: Trim message leading newlines
Fix libgit2/libgit2sharp#522
Diffstat (limited to 'src/commit.c')
-rw-r--r-- | src/commit.c | 2 |
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 */ |