summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-05-11 14:02:53 -0400
committerEdward Thomson <ethomson@microsoft.com>2015-05-11 14:12:47 -0400
commit4497287321d2d2624316b38c00a032a5e890e88f (patch)
tree0f59b320b61a56b4ab73a5c0b76572f006e97831
parent4ea3eebf4b53274b885f749f543101f6633c665e (diff)
downloadlibgit2-4497287321d2d2624316b38c00a032a5e890e88f.tar.gz
stash: propagate the error when writing a tree
-rw-r--r--src/stash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stash.c b/src/stash.c
index 71ab7b945..c79068edf 100644
--- a/src/stash.c
+++ b/src/stash.c
@@ -106,7 +106,7 @@ static int build_tree_from_index(git_tree **out, git_index *index)
git_oid i_tree_oid;
if ((error = git_index_write_tree(&i_tree_oid, index)) < 0)
- return -1;
+ return error;
return git_tree_lookup(out, git_index_owner(index), &i_tree_oid);
}