git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: JP Sugarbroad
Message 4 of 4 in “git fetch origin $SHA1 doesn't work as often as it could”
  1. JP SugarbroadMay 18, 2016
  2. Junio C HamanoMay 18, 2016
  3. JP SugarbroadMay 18, 2016
  4. Jeff KingMay 19, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.