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>
Junio C Hamano committed
Dec 4, 2007 at 23:01 UTC
c6bc40058565fef3ec79840bf5e13ba0962cb3e4
1 file changed
+1
-1
transport.c
+1
-1
@@ -659,7 +659,7 @@ static int fetch_refs_via_pack(struct transport *transport,
659
free(heads);
660
free_refs(refs);
661
free(dest);
662
- return 0;
662
+ return (refs ? 0 : -1);
663
}
664
665
static int git_transport_push(struct transport *transport, int refspec_nr, const char **refspec, int flags)