Skip to content

Commit 3ae8def

Browse files
committed
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
2 parents aec3b2e + ad7a403 commit 3ae8def

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

send-pack.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -565,19 +565,19 @@ int send_pack(struct send_pack_args *args,
565565

566566
if (need_pack_data && cmds_sent) {
567567
if (pack_objects(out, remote_refs, extra_have, args) < 0) {
568-
for (ref = remote_refs; ref; ref = ref->next)
569-
ref->status = REF_STATUS_NONE;
570568
if (args->stateless_rpc)
571569
close(out);
572570
if (git_connection_is_socket(conn))
573571
shutdown(fd[0], SHUT_WR);
574572

575573
/*
576574
* Do not even bother with the return value; we know we
577-
* are failing, and just want the error() side effects.
575+
* are failing, and just want the error() side effects,
576+
* as well as marking refs with their remote status (if
577+
* we get one).
578578
*/
579579
if (status_report)
580-
receive_unpack_status(&reader);
580+
receive_status(&reader, remote_refs);
581581

582582
if (use_sideband) {
583583
close(demux.out);

0 commit comments

Comments
 (0)