diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-10-28 09:01:12 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-28 09:01:12 -0700 |
commit | 9338904a5f91141ca2502abfbca87730a3aa48f0 (patch) | |
tree | 37e818f3bbfed8623e5c8ab320b389c4217c5d38 | |
parent | Merge branch 'js/regexec-buf' into maint (diff) | |
parent | fetch-pack: do not reset in_vain on non-novel acks (diff) | |
download | tgif-9338904a5f91141ca2502abfbca87730a3aa48f0.tar.xz |
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
-rw-r--r-- | fetch-pack.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fetch-pack.c b/fetch-pack.c index 85e77af61d..413937e740 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -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); |