Re: [PATCH 2/2] receive-pack: use advertised reference tips to inform connectivity check
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Nov 2, 2022, 01:05 UTC
- Message-ID
- <Y2HCQAGfY+xsDzKe@nand.local>
- In-Reply-To
- <Y2EIxp+YM0Bee79v@ncase>
On Tue, Nov 01, 2022 at 12:53:42PM +0100, Patrick Steinhardt wrote:
Show 21 quoted lines
> > > Maybe, though I think it's fine to let clients send us smaller packfiles > > > if they have some a-priori knowledge that the server has objects that it > > > isn't advertising. And that can all happen without buggy code. So it's > > > weird, but there isn't anything wrong with letting it happen. > > > > Well, I don't see how to achieve both at the same time though: we can > > either limit the set of uninteresting tips to what we have announced to > > the client, or we allow clients to omit objects that have not been > > announced. These are mutually exclusive. > > > > So if we take the stance that it was fine to send packfiles that omit > > hidden objects and that this is something we want to continue to support > > then this patch series probably becomes moot. Doing the proposed > > optimization means that we also tighten the rules here. > > I'm wrong and you're right: we can do the optimization to limit the refs > we use but still let clients send objects that are hidden. I didn't take > into account that this is merely an optimization that we stop walking at > reachable tips. I'll reword the commit message when having another go > and will likely do something along the lines of your proposed new > `--visible-refs` option in v2 of this series.
I wasn't necessarily advocating for a behavior change in this series, more pointing out that the situation you said can only happen with buggy code doesn't actually require a bug in practice.
Thanks, Taylor