All of lore.kernel.org
 help / color / mirror / Atom feed
* proposal: allow git clone for http-hosted bundles
@ 2016-07-17  4:41 mappu
  2016-07-17  6:45 ` Jeff King
  2016-07-17  7:15 ` Johannes Schindelin
  0 siblings, 2 replies; 4+ messages in thread
From: mappu @ 2016-07-17  4:41 UTC (permalink / raw)
  To: git

Hi list,

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`.

Regards

mappu


(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).


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: proposal: allow git clone for http-hosted bundles
  2016-07-17  4:41 proposal: allow git clone for http-hosted bundles mappu
@ 2016-07-17  6:45 ` Jeff King
  2016-07-17 19:06   ` Junio C Hamano
  2016-07-17  7:15 ` Johannes Schindelin
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff King @ 2016-07-17  6:45 UTC (permalink / raw)
  To: mappu; +Cc: git

On Sun, Jul 17, 2016 at 04:41:54PM +1200, mappu wrote:

> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: proposal: allow git clone for http-hosted bundles
  2016-07-17  4:41 proposal: allow git clone for http-hosted bundles mappu
  2016-07-17  6:45 ` Jeff King
@ 2016-07-17  7:15 ` Johannes Schindelin
  1 sibling, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2016-07-17  7:15 UTC (permalink / raw)
  To: mappu; +Cc: git

Ho mappu,

On Sun, 17 Jul 2016, mappu wrote:

> 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`.

Why don't you just give it a whirl? That would answer the question pretty
quickly...

Ciao,
Johannes

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: proposal: allow git clone for http-hosted bundles
  2016-07-17  6:45 ` Jeff King
@ 2016-07-17 19:06   ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2016-07-17 19:06 UTC (permalink / raw)
  To: Jeff King; +Cc: mappu, git

Jeff King <peff@peff.net> writes:

> 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.

I recently learned about http://repo.or.cz/git.git/bundles which
is a very nicely done set of instructions ;-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-17 19:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-17  4:41 proposal: allow git clone for http-hosted bundles mappu
2016-07-17  6:45 ` Jeff King
2016-07-17 19:06   ` Junio C Hamano
2016-07-17  7:15 ` Johannes Schindelin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.