Commit d8d28e2ef69bf484639a5f2c5b16ac3007b90e78

Vicent Marti 2012-08-06T12:44:23

remotes: Proper return for `git_remote_ls`

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/remote.c b/src/remote.c
index adbfdc4..a90c8a7 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -420,10 +420,8 @@ int git_remote_ls(git_remote *remote, git_headlist_cb list_cb, void *payload)
 
 		pkt = (git_pkt_ref *)p;
 
-		if (list_cb(&pkt->head, payload) < 0) {
-			giterr_set(GITERR_NET, "User callback returned error");
-			return -1;
-		}
+		if (list_cb(&pkt->head, payload) < 0)
+			return GIT_EUSER;
 	}
 
 	return 0;