diff options
author | Vicent Martà <vicent@github.com> | 2013-04-15 06:11:29 -0700 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2013-04-15 06:11:29 -0700 |
commit | 2d2260da41ddf22fd5c5f0c39ce16fad1548f29e (patch) | |
tree | 2c41d4ca3f9f27bf105ea0d9819f15b541d6c646 /src/commit.c | |
parent | 041ed367ab026583d6607b5029a0c63146a90215 (diff) | |
parent | 0efae3b22e7472b95174632c323137a2b21b9c51 (diff) | |
download | libgit2-2d2260da41ddf22fd5c5f0c39ce16fad1548f29e.tar.gz |
Merge pull request #1467 from carlosmn/commit-parse
commit: correctly detect the start of the commit message
Diffstat (limited to 'src/commit.c')
-rw-r--r-- | src/commit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commit.c b/src/commit.c index e2d3d346b..c7b83ed43 100644 --- a/src/commit.c +++ b/src/commit.c @@ -189,8 +189,8 @@ int git_commit__parse_buffer(git_commit *commit, const void *data, size_t len) buffer = eoln; } - /* skip blank lines */ - while (buffer < buffer_end - 1 && *buffer == '\n') + /* buffer is now at the end of the header, double-check and move forward into the message */ + if (buffer < buffer_end && *buffer == '\n') buffer++; /* parse commit message */ |