Commit 9217bbda49264e016e4c24950292cd2572ffed51

John Wiegley 2011-02-01T05:00:52

Fixed a bug with the way commits are written

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/commit.c b/src/commit.c
index c3fa382..49e2354 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;