Subject: Re: [PATCH 1/1] builtin/pack-objects.c: avoid iterating all refs

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Wed, 20 Jan 2021 17:32:27 +0100

On Wed, Jan 20 2021, Taylor Blau wrote:

> On Wed, Jan 20, 2021 at 09:50:19AM +0100, Ævar Arnfjörð Bjarmason wrote:
>> It seems we might just be able to delete this code on the server-side,
>> per protocol-capabilities.txt:
>>
>>     Clients MUST be prepared for the case where a server has ignored
>>     include-tag and has not actually sent tags in the pack.  In such
>>     cases the client SHOULD issue a subsequent fetch to acquire the tags
>>     that include-tag would have otherwise given the client.
>>
>> I.e. in the case where the server isn't playing along and I haven't set
>> "+refs/tags/*:refs/tags/*". But as the test shows we don't do that
>> following ourselves unless refs/tags/* is in the refspec (and then it's
>> not really "following", we're just getting all the tags).
>
> Reading your email, I see no reason not to do it, and that snippet from
> protocol-capabilities.txt makes me feel even better about doing so.
>
> I'd be happy to have Jacob's patch picked up in the meantime, but I
> think that this is a good direction to pursue.

Oh yes, none of this is commentary on not accepting the much smaller and
obviously correct change in the meantime.  Just musings this general
area of fetching & ideas for further optimization.