summaryrefslogtreecommitdiff
path: root/send-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-12-01 17:04:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-01 17:04:40 (GMT)
commit3ae8defaf90629cd3cf85ee349e8a7e61ff81b31 (patch)
tree5c9899456e84cb99d12d7f80c2c7499a46c41e74 /send-pack.c
parentaec3b2e24f83e8b5985257b8270029c968e980b3 (diff)
parentad7a403268735b98566cff4b082710bbb0d9f417 (diff)
downloadgit-3ae8defaf90629cd3cf85ee349e8a7e61ff81b31.zip
git-3ae8defaf90629cd3cf85ee349e8a7e61ff81b31.tar.gz
git-3ae8defaf90629cd3cf85ee349e8a7e61ff81b31.tar.bz2
Merge branch 'jk/send-pack-remote-failure'
Error handling after "git push" finishes sending the packdata and waits for the response to the remote side has been improved. * jk/send-pack-remote-failure: send-pack: check remote ref status on pack-objects failure
Diffstat (limited to 'send-pack.c')
-rw-r--r--send-pack.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/send-pack.c b/send-pack.c
index 34c77cb..a7322d3 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -565,8 +565,6 @@ int send_pack(struct send_pack_args *args,
if (need_pack_data && cmds_sent) {
if (pack_objects(out, remote_refs, extra_have, args) < 0) {
- for (ref = remote_refs; ref; ref = ref->next)
- ref->status = REF_STATUS_NONE;
if (args->stateless_rpc)
close(out);
if (git_connection_is_socket(conn))
@@ -574,10 +572,12 @@ int send_pack(struct send_pack_args *args,
/*
* Do not even bother with the return value; we know we
- * are failing, and just want the error() side effects.
+ * are failing, and just want the error() side effects,
+ * as well as marking refs with their remote status (if
+ * we get one).
*/
if (status_report)
- receive_unpack_status(&reader);
+ receive_status(&reader, remote_refs);
if (use_sideband) {
close(demux.out);