Re: [PATCH 11/12] receive-pack: treat namespace .have lines like alternates
- From
Jeff King <peff@peff.net>
- Date
- Jan 25, 2017, 19:58 UTC
- Message-ID
- <20170125195847.j6gy6vl5bm4liynp@sigill.intra.peff.net>
- In-Reply-To
- <xmqqa8aec40a.fsf@gitster.mtv.corp.google.com>
On Wed, Jan 25, 2017 at 11:51:17AM -0800, Junio C Hamano wrote:
Show 9 quoted lines
> This is an unrelated tangent, but there may want to be a knob to > make the code return here without even showing, to make the > advertisement even smaller and also to stop miniscule information > leakage? If the namespaced multiple projects are totally unrelated > (i.e. "My sysadmin gave me a write access only to this single > directory, so I am using the namespace feature to host these three > projects that have nothing to do with each other"), showing objects > of other namespaces will buy us nothing and the user is better off > without this code showing these refs as ".have".
Yeah, I'd agree it's a potential issue. And I definitely do the same with alternates (in my case it isn't "they're not relevant" as much as "they are too big, and the optimization backfires").
I don't use namespaces myself[1], though, so I'd prefer to leave that to somebody who has that itch, and could think it through better.
-Peff
[1] They _seem_ like they'd be a good fit for the way GitHub uses
alternates, but since they're only implemented for fetch/push,
they're only a small part of the story. Plus the ref storage has
traditionally been a scaling bottleneck for us, so it's nice for
each fork to have its own ref storage for operations that just touch
that fork.