diff options
author | Edward Thomson <ethomson@microsoft.com> | 2014-01-22 14:41:04 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2014-01-22 14:41:04 -0500 |
commit | 238e8149724ea462153cc082385f60dccc2a3cf9 (patch) | |
tree | b251bc295ef08aef080ceabbac10f5dd9924b724 /src/commit.c | |
parent | 2b678ce5b4ebbc1d045f2a07651720d8c1e6458c (diff) | |
download | libgit2-238e8149724ea462153cc082385f60dccc2a3cf9.tar.gz |
Summarize empty messages
Diffstat (limited to 'src/commit.c')
-rw-r--r-- | src/commit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/commit.c b/src/commit.c index f0e304a84..e437cffe6 100644 --- a/src/commit.c +++ b/src/commit.c @@ -311,7 +311,10 @@ const char *git_commit_summary(git_commit *commit) git_buf_putc(&summary, *msg); } - commit->summary = git_buf_detach(&summary); + if (summary.asize == 0) + commit->summary = git__strdup(""); + else + commit->summary = git_buf_detach(&summary); } return commit->summary; |