summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-12-04 23:01:19 -0800
committerJunio C Hamano <gitster@pobox.com>2007-12-06 07:54:06 -0800
commitc6bc40058565fef3ec79840bf5e13ba0962cb3e4 (patch)
treeabbd42d727f41f7e4ca5c3886e14be7f0049110e /transport.c
parentc9ecf4f12aecabfad87507ebd133476ea99fe4cb (diff)
downloadgit-c6bc40058565fef3ec79840bf5e13ba0962cb3e4.tar.gz
do not discard status in fetch_refs_via_pack()
The code calls fetch_pack() to get the list of refs it fetched, and discards refs and always returns 0 to signal success. But builtin-fetch-pack.c::fetch_pack() has error cases. The function returns NULL if error is detected (shallow-support side seems to choose to die but I suspect that is easily fixable to error out as well). Make fetch_refs_via_pack() propagate that error to the caller. Acked-By: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/transport.c b/transport.c
index 3eb93b4875..58e66f6c11 100644
--- a/transport.c
+++ b/transport.c
@@ -659,7 +659,7 @@ static int fetch_refs_via_pack(struct transport *transport,
free(heads);
free_refs(refs);
free(dest);
- return 0;
+ return (refs ? 0 : -1);
}
static int git_transport_push(struct transport *transport, int refspec_nr, const char **refspec, int flags)