summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2011-02-01 05:00:52 -0500
committerJohn Wiegley <johnw@newartisans.com>2011-02-01 05:04:49 -0500
commit9217bbda49264e016e4c24950292cd2572ffed51 (patch)
tree0dac21a8e5748c047af1769b994aec2f08425a48 /src/commit.c
parent89f9fc6f4b1a17b8318a0f11a51c967f1504ed34 (diff)
downloadlibgit2-9217bbda49264e016e4c24950292cd2572ffed51.tar.gz
Fixed a bug with the way commits are written
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/commit.c b/src/commit.c
index c3fa3823..49e23545 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -91,8 +91,10 @@ int git_commit__writeback(git_commit *commit, git_odb_source *src)
git_signature__write(src, "committer", commit->committer);
- if (commit->message != NULL)
- git__source_printf(src, "\n%s", commit->message);
+ if (commit->message != NULL) {
+ git__source_write(src, "\n", 1);
+ git__source_write(src, commit->message, strlen(commit->message));
+ }
/* Mark the commit as having all attributes */
commit->full_parse = 1;