summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-07-12 22:31:53 +0200
committernulltoken <emeric.fermas@gmail.com>2012-07-12 22:33:48 +0200
commitb5f90115240e333a60809ef912934bce8afae0c1 (patch)
treeb0a74f95d90f8768ff6dc76ccf859a19bbffa514 /src
parent5a6f31f28b58d93232b742f02ad0a6f64c0dfbb8 (diff)
downloadlibgit2-b5f90115240e333a60809ef912934bce8afae0c1.tar.gz
revparse: fix propagation of error
Diffstat (limited to 'src')
-rw-r--r--src/revparse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/revparse.c b/src/revparse.c
index 2631e50d..777dee68 100644
--- a/src/revparse.c
+++ b/src/revparse.c
@@ -151,7 +151,7 @@ static int revparse_lookup_object(git_object **out, git_repository *repo, const
if (!error) {
error = git_object_lookup(out, repo, git_reference_oid(ref), GIT_OBJ_ANY);
git_reference_free(ref);
- return 0;
+ return error;
}
if (error < 0 && error != GIT_ENOTFOUND)