Commit b5f90115240e333a60809ef912934bce8afae0c1

nulltoken 2012-07-12T22:31:53

revparse: fix propagation of error

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/revparse.c b/src/revparse.c
index 2631e50..777dee6 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)