summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c9ecf4f)
raw | patch | inline | side by side (parent: c9ecf4f)
author | Junio C Hamano <gitster@pobox.com> | |
Wed, 5 Dec 2007 07:01:19 +0000 (23:01 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 6 Dec 2007 15:54:06 +0000 (07:54 -0800) |
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>
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>
transport.c | patch | blob | history |
diff --git a/transport.c b/transport.c
index 3eb93b4875ed0e4884088565a0faa45cc3d287e3..58e66f6c11798dac416941ce5ad3dbae91c31a06 100644 (file)
--- a/transport.c
+++ b/transport.c
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)