Merge branch 'jt/fetch-pack-in-vain-count-with-stateless' into maint

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:
Junio C Hamano 2016-10-28 09:01:12 -07:00
commit 9338904a5f

View file

@ -428,10 +428,17 @@ static int find_common(struct fetch_pack_args *args,
const char *hex = sha1_to_hex(result_sha1);
packet_buf_write(&req_buf, "have %s\n", hex);
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);
retval = 0;
in_vain = 0;
got_continue = 1;
if (ack == ACK_ready) {
clear_prio_queue(&rev_list);