From: Jeff King Date: Wed, 30 May 2012 21:59:12 GMT Subject: Re: [PATCH 2/2] clone: allow --no-local to turn off local optimizations Message-ID: <20120530215912.GC3237@sigill.intra.peff.net> In-Reply-To: <7vzk8pziuk.fsf@alter.siamese.dyndns.org> 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