summaryrefslogtreecommitdiff
path: root/builtin/pull.c
diff options
context:
space:
mode:
authorLibravatar Jonathan Tan <jonathantanmy@google.com>2016-09-23 10:41:35 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-09-23 12:37:45 -0700
commit06b3d386e0a5841c11b6730f95c44068790d791e (patch)
treeccbf9fc8074502043ef56c8bce65eea30c1e2b0e /builtin/pull.c
parentStart preparing for 2.10.1 (diff)
downloadtgif-06b3d386e0a5841c11b6730f95c44068790d791e.tar.xz
fetch-pack: do not reset in_vain on non-novel acks
The MAX_IN_VAIN mechanism was introduced in commit f061e5f ("fetch-pack: give up after getting too many "ack continue"", 2006-05-24) to stop ref negotiation if a number of consecutive "have"s have been sent with no corresponding new acks. This is to stop the client from digging too deep in an irrelevant side branch in vain without ever finding a common ancestor. A use case (as described in that commit) is the scenario in which the local repository has more roots than the remote repository. However, during a negotiation in which stateless RPCs are used, MAX_IN_VAIN will (almost) never trigger (in the more-roots scenario above and others) because in each new request, the client has to inform the server of objects it already has and knows the server has (to remind the server of the state), which the server then acks. Make fetch-pack only consider, as new acks for the purpose of MAX_IN_VAIN, acks for objects for which the client has never received an ack before in this session. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/pull.c')
0 files changed, 0 insertions, 0 deletions