git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: mappu <mappu04@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: proposal: allow git clone for http-hosted bundles
Date: Sun, 17 Jul 2016 02:45:13 -0400	[thread overview]
Message-ID: <20160717064513.GA2049@sigill.intra.peff.net> (raw)
In-Reply-To: <2841ce89-9c46-c3f2-53d8-afef6e1e5b01@gmail.com>

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

  reply	other threads:[~2016-07-17  6:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-17  4:41 proposal: allow git clone for http-hosted bundles mappu
2016-07-17  6:45 ` Jeff King [this message]
2016-07-17 19:06   ` Junio C Hamano
2016-07-17  7:15 ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160717064513.GA2049@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=mappu04@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).