Re: git fetch origin $SHA1 doesn't work as often as it could
- From
Jeff King <peff@peff.net>
- Date
- May 19, 2016, 01:53 UTC
- Message-ID
- <20160519015323.GA24225@sigill.intra.peff.net>
- In-Reply-To
- <CAD0oC4wezb8svOW5KHONLi5wQN+H_3xqPLoU_EZbtL5zAkdv_Q@mail.gmail.com>
On Wed, May 18, 2016 at 06:40:37PM -0400, JP Sugarbroad wrote:
Show 8 quoted lines
> > I just fear that it is a wrong approach to solve the real issue and > > instead make it worse by relieving the pressure from the project and > > hosting site to configure their repository to support their users > > properly. > > Unfortunately I don't see the likes of github or bitbucket adding > allow-reachable-sha1-in-want any time soon, as it is an expensive > operation server-side.
I don't think it's _too_ bad, at least compared to some of the nastier things one can convince the server side of a git fetch to do. It at least looks at just the commits; the bad cases usually involve traversing the whole object graph.
It's also something that's easily sped up with reachability bitmaps.
But I haven't done any real analysis on the kind of load it would cause. So no promises, but I don't think it's outside the realm of possibility for GitHub to enable, if it's something that would be useful to a lot of people. I can't speak for Bitbucket. :)
-Peff