Skip to content

Commit 4793b7e

Browse files
committed
Revert "upload-pack: Implement no-done capability"
This reverts 3e63b21 (upload-pack: Implement no-done capability, 2011-03-14). Together with 761ecf0 (fetch-pack: Implement no-done capability, 2011-03-14) it seems to make the fetch-pack process out of sync and makes it keep talking long after upload-pack stopped listening to it, terminating the process with SIGPIPE.
1 parent 61e8aaf commit 4793b7e

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

upload-pack.c

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ static const char upload_pack_usage[] = "git upload-pack [--strict] [--timeout=<
2727
static unsigned long oldest_have;
2828

2929
static int multi_ack, nr_our_refs;
30-
static int no_done;
3130
static int use_thin_pack, use_ofs_delta, use_include_tag;
3231
static int no_progress, daemon_mode;
3332
static int shallow_nr;
@@ -432,7 +431,6 @@ static int get_common_commits(void)
432431
char last_hex[41];
433432
int got_common = 0;
434433
int got_other = 0;
435-
int sent_ready = 0;
436434

437435
save_commit_buffer = 0;
438436

@@ -442,17 +440,10 @@ static int get_common_commits(void)
442440

443441
if (!len) {
444442
if (multi_ack == 2 && got_common
445-
&& !got_other && ok_to_give_up()) {
446-
sent_ready = 1;
443+
&& !got_other && ok_to_give_up())
447444
packet_write(1, "ACK %s ready\n", last_hex);
448-
}
449445
if (have_obj.nr == 0 || multi_ack)
450446
packet_write(1, "NAK\n");
451-
452-
if (no_done && sent_ready) {
453-
packet_write(1, "ACK %s\n", last_hex);
454-
return 0;
455-
}
456447
if (stateless_rpc)
457448
exit(0);
458449
got_common = 0;
@@ -466,10 +457,9 @@ static int get_common_commits(void)
466457
got_other = 1;
467458
if (multi_ack && ok_to_give_up()) {
468459
const char *hex = sha1_to_hex(sha1);
469-
if (multi_ack == 2) {
470-
sent_ready = 1;
460+
if (multi_ack == 2)
471461
packet_write(1, "ACK %s ready\n", hex);
472-
} else
462+
else
473463
packet_write(1, "ACK %s continue\n", hex);
474464
}
475465
break;
@@ -545,8 +535,6 @@ static void receive_needs(void)
545535
multi_ack = 2;
546536
else if (strstr(line+45, "multi_ack"))
547537
multi_ack = 1;
548-
if (strstr(line+45, "no-done"))
549-
no_done = 1;
550538
if (strstr(line+45, "thin-pack"))
551539
use_thin_pack = 1;
552540
if (strstr(line+45, "ofs-delta"))
@@ -640,7 +628,7 @@ static int send_ref(const char *refname, const unsigned char *sha1, int flag, vo
640628
{
641629
static const char *capabilities = "multi_ack thin-pack side-band"
642630
" side-band-64k ofs-delta shallow no-progress"
643-
" include-tag multi_ack_detailed no-done";
631+
" include-tag multi_ack_detailed";
644632
struct object *o = parse_object(sha1);
645633

646634
if (!o)

0 commit comments

Comments
 (0)