diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-09-29 16:57:13 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-29 16:57:13 -0700 |
commit | 938c2a63212847bf87fc2a7076ccd4e15dfa3955 (patch) | |
tree | 210b729986409032610fe25f3d30b7d03cc623ce | |
parent | Merge branch 'jk/verify-packfile-gently' (diff) | |
parent | fetch-pack: do not reset in_vain on non-novel acks (diff) | |
download | tgif-938c2a63212847bf87fc2a7076ccd4e15dfa3955.tar.xz |
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
-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); |