Web lists-archives.com

Re: [PATCH] doc: explain why file: URLs and bundles don't mix




On Mon, May 13, 2019 at 05:05:14PM +0900, Junio C Hamano wrote:

> I think what is closer to the reaility is that we check if the
> source is a bundle when the local filesystem path is used and try to
> clone from the bundle, before using the local filesystem path as a
> directory we can "clone --local" from.  On the other hand, when the
> <scheme>://<path> syntax is used, we do not even bother seeing if
> the named resource is a bundle, or if --local optimization is
> possible (because we do not bother seeing if the named resource is a
> local filesystem entity, either).

Yeah. My concern on reading Alyssa's patch is that it goes into too much
detail about "why", when this is basically just "it's a bug that nobody
has yet fixed". I think it makes sense to warn people about the
behavior, but we should probably be vague about the reasons and up-front
that there is really no good reason that it doesn't work (and it might
in the future).

Of course fixing the issue is better still. ;)

> A possibly interesting tangent to think about is what would happen
> if we slightly tweak the above design.  What it would require for
> the code to take "git clone https://site/repo.bndl";, realize that
> the named resource is a bundle file, curl/wget it and clone from
> that downloaded bundle?  And if it is feasible to implement, would
> it even be a good idea to begin with?  I do not have a ready answer
> to either of these questions myself.

I've been meaning to come back to this for, oh, going on 8 years now:

  https://public-inbox.org/git/20111110074330.GA27925@xxxxxxxxxxxxxxxxxxxxx/

(though it was meant to work with a CDN "try this first then top-off"
strategy; with Jonathan Tan's more flexible CDN work which uses raw
packfiles, I doubt I'd come back to this).

-Peff