Commit 944d250f964698b33d9fa09e2e6af74b1dd84de2

Carlos Martín Nieto 2012-07-24T10:34:28

update_tips: report error if it fails to create a ref

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/remote.c b/src/remote.c
index 00e108a..e46249e 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -377,7 +377,7 @@ int git_remote_update_tips(git_remote *remote, int (*cb)(const char *refname, co
 			continue;
 
 		if (git_reference_create_oid(&ref, remote->repo, refname.ptr, &head->oid, 1) < 0)
-			break;
+			goto on_error;
 
 		git_reference_free(ref);