Re: [PATCH 2/2] clone: allow --no-local to turn off local optimizations

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 2/2] clone: allow --no-local to turn off local optimizations

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:56

Makes sense; thanks.

By the way, a somewhat funny exercise I found last night is this:

	$ cd /var/tmp
        $ mkdir -p foo.xz:pub/git.git
        $ cd foo.xz:pub/git.git
        $ git init
        $ git commit --allow-empty -m initial
        $ cd /var/tmp
        $ git clone foo.xz:pub/git.git x

This does not work as the transfer phase wants to run ssh on it.

Re: [PATCH 2/2] clone: allow --no-local to turn off local optimizations

From: Jeff King <hidden>
Date: 2016-06-15 22:53:57

On Wed, May 30, 2012 at 10:20:19AM -0700, Junio C Hamano wrote:
By the way, a somewhat funny exercise I found last night is this:

	$ cd /var/tmp
        $ mkdir -p foo.xz:pub/git.git
        $ cd foo.xz:pub/git.git
        $ git init
        $ git commit --allow-empty -m initial
        $ cd /var/tmp
        $ git clone foo.xz:pub/git.git x

This does not work as the transfer phase wants to run ssh on it.
Yeah, you would have to do file://$PWD/foo.xz:pub/git.git, I think. Of
course, there would be no way to specify "--local" while doing so... :)

Similarly, I find it a little odd that "git clone file:///foo.git" will
actually find a file named "file:/foo.git" before checking the URL (IOW,
the argument is a path first, and then fallback to URL). I suspect
nobody actually cares about either, as they are very unlikely corner
cases.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help