Commit fea15f7c74226cf0bbecd595ed7a78e1ce760204

Carlos Martín Nieto 2014-11-30T01:52:22

Merge pull request #2736 from ethomson/describe_errorcode describe: check error codes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/describe.c b/src/describe.c
index a193fcb..57f715b 100644
--- a/src/describe.c
+++ b/src/describe.c
@@ -682,9 +682,9 @@ int git_describe_commit(
 	if ((error = git_object_peel((git_object **)(&commit), committish, GIT_OBJ_COMMIT)) < 0)
 		goto cleanup;
 
-	if (git_reference_foreach_name(
+	if ((error = git_reference_foreach_name(
 			git_object_owner(committish),
-			get_name, &data) < 0)
+			get_name, &data)) < 0)
 				goto cleanup;
 
 	if (git_oidmap_size(data.names) == 0) {