Re: [PATCH 06/16] upload-pack: generalize commit date cutoff
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Jul 18, 2018, 16:04 UTC
- Message-ID
- <7ccf3170-dd7e-6322-a128-b31a29f6ac7b@gmail.com>
- In-Reply-To
- <CAGZ79kZVyd1BgWGW85PxF_4Skv4pEB=a5iH_1i=5B6X07cfyoA@mail.gmail.com>
On 7/16/2018 3:38 PM, Stefan Beller wrote:
Show 13 quoted lines
> On Mon, Jul 16, 2018 at 6:00 AM Derrick Stolee via GitGitGadget > <gitgitgadget@gmail.com> wrote: >> From: Derrick Stolee <dstolee@microsoft.com> >> >> The ok_to_give_up() method uses the commit date as a cutoff to avoid >> walking the entire reachble set of commits. Before moving the >> reachable() method to commit-reach.c, pull out the dependence on the >> global constant 'oldest_have' with a 'min_commit_date' parameter. > > 'oldest_have' seems to be used in only one method after that > (function got_oid); but as that function is called many times > we either have to make it a function-global or pass around as a parameter, > we'll defer that to later.
There is a lot of global state involved in this negotiation code, and it lives between negotiation rounds when the transfer is stateful. Tread carefully!
I did not attempt to reduce the global state at all.
Thanks,
-Stolee