summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commit.c b/src/commit.c
index bf6ca7855..5d077d54e 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -129,7 +129,8 @@ int git_commit_create(
git_buf_puts(&commit, message);
if (git_buf_oom(&commit)) {
- error = git__throw(GIT_ENOMEM, "Not enough memory to build the commit data");
+ error = git__throw(git_buf_lasterror(&commit),
+ "Not enough memory to build the commit data");
goto cleanup;
}