Merge branch 'jt/fetch-pack-in-vain-count-with-stateless'
When "git fetch" tries to find where the history of the repository it runs in has diverged from what the other side has, it has a mechanism to avoid digging too deep into irrelevant side branches. This however did not work well over the "smart-http" transport due to a design bug, which has been fixed. * jt/fetch-pack-in-vain-count-with-stateless: fetch-pack: do not reset in_vain on non-novel acks
This commit is contained in:
commit
938c2a6321
11
fetch-pack.c
11
fetch-pack.c
@ -428,10 +428,17 @@ static int find_common(struct fetch_pack_args *args,
|
|||||||
const char *hex = sha1_to_hex(result_sha1);
|
const char *hex = sha1_to_hex(result_sha1);
|
||||||
packet_buf_write(&req_buf, "have %s\n", hex);
|
packet_buf_write(&req_buf, "have %s\n", hex);
|
||||||
state_len = req_buf.len;
|
state_len = req_buf.len;
|
||||||
}
|
/*
|
||||||
|
* Reset in_vain because an ack
|
||||||
|
* for this commit has not been
|
||||||
|
* seen.
|
||||||
|
*/
|
||||||
|
in_vain = 0;
|
||||||
|
} else if (!args->stateless_rpc
|
||||||
|
|| ack != ACK_common)
|
||||||
|
in_vain = 0;
|
||||||
mark_common(commit, 0, 1);
|
mark_common(commit, 0, 1);
|
||||||
retval = 0;
|
retval = 0;
|
||||||
in_vain = 0;
|
|
||||||
got_continue = 1;
|
got_continue = 1;
|
||||||
if (ack == ACK_ready) {
|
if (ack == ACK_ready) {
|
||||||
clear_prio_queue(&rev_list);
|
clear_prio_queue(&rev_list);
|
||||||
|
Loading…
Reference in New Issue
Block a user