summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorTim Clem <timothy.clem@gmail.com>2012-06-15 10:15:57 -0700
committerTim Clem <timothy.clem@gmail.com>2012-06-15 10:18:08 -0700
commite00b56eb04145717ed3e8dc45cc4e03addccd7c7 (patch)
tree3e8c3d68e303b8e1ae25068fa13ad0815cda6313 /src/commit.c
parente4031cb53134803bfc94f1b0b8552455658d8c76 (diff)
downloadlibgit2-e00b56eb04145717ed3e8dc45cc4e03addccd7c7.tar.gz
Fix broken tests caused by no longer prettifying by default
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/commit.c b/src/commit.c
index a87639aa..a3baf9d4 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -93,7 +93,7 @@ int git_commit_create(
int parent_count,
const git_commit *parents[])
{
- git_buf commit = GIT_BUF_INIT, cleaned_message = GIT_BUF_INIT;
+ git_buf commit = GIT_BUF_INIT;
int i;
git_odb *odb;
@@ -114,11 +114,9 @@ int git_commit_create(
git_buf_putc(&commit, '\n');
- if (git_buf_puts(&commit, git_buf_cstr(&cleaned_message)) < 0)
+ if (git_buf_puts(&commit, message) < 0)
goto on_error;
- git_buf_free(&cleaned_message);
-
if (git_repository_odb__weakptr(&odb, repo) < 0)
goto on_error;
@@ -134,7 +132,6 @@ int git_commit_create(
on_error:
git_buf_free(&commit);
- git_buf_free(&cleaned_message);
giterr_set(GITERR_OBJECT, "Failed to create commit.");
return -1;
}