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

Re: proposal: allow git clone for http-hosted bundles

From
Jeff King <peff@peff.net>
Date
Jul 17, 2016, 06:45 UTC
Message-ID
<20160717064513.GA2049@sigill.intra.peff.net>
In-Reply-To
<2841ce89-9c46-c3f2-53d8-afef6e1e5b01@gmail.com>
On Sun, Jul 17, 2016 at 04:41:54PM +1200, mappu wrote:
Show 6 quoted lines
> Right now it's possible to git clone a repository over http, and git clone a
> bundle from the local filesystem, but it's not possible to git clone a
> bundle hosted on http.
> 
> Would it be possible to allow this in the future? Hopefully it's only a
> minor refactor in `builtin/clone.c`.
It's a bit more than a minor refactor. Long ago, I submitted
  http://thread.gmane.org/gmane.comp.version-control.git/185196

The tricky thing is having the http code handle the case that we get a bundle when accessing the repository.

I think I got stalled in a "perfect is the enemy of the good" situation. I wanted to clean up the patches to avoid spooling the bundle to disk (because it means we temporarily required 2x disk space). But in retrospect, it would be fine to start there, and if somebody wants to take on resumable index-pack, that can be a separate topic.

So I never ended up getting back to it. And somehow almost 5 years have passed yikes.

If anybody is interested in working on it, they can start from those patches, or from the jk/bundle-fetch-wip branch at https://github.com/peff/git. The latter has been continually rebased on master for the past 5 years, _but_ in a fairly blind manner. I resolve conflicts, but anything with "-wip" in the title is not part of my regular build. So it has not been compiled nor had its tests run in all that time. Caveat emptor.

> (Back story: I'm stuck with a git frontend that only ever calls `git clone
> ${target}` - that's Golang's `go get` - but bundles are a bit better fit for
> my request patterns than raw repositories).

You might do better to stick a shim script in your $PATH to just intercept the calls to git. Hacky, but it would probably solve your problem with a minimal amount of code.

-Peff
Previous: mappuNext: Junio C Hamano
Message 2 of 4 in “proposal: allow git clone for http-hosted bundles”
  1. mappuJul 17, 2016
  2. Jeff KingJul 17, 2016
  3. Junio C HamanoJul 17, 2016
  4. Johannes SchindelinJul 17, 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.