On Wed, May 30, 2012 at 03:10:37PM -0700, Junio C Hamano wrote: > Jeff King <peff@xxxxxxxx> writes: > > > 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. > > Yeah, if anything, I would have expected --no-local to mean "I might > have a local file that happens to be the same as this URL, but I am > not cloning from there; just go straight to the URL using transports". But that would not be the opposite of "--local", which you have just argued is not about interpreting the URL syntax at all, but is about turning off the local optimization code path when the origin repo is local. Interestingly, it seems that we don't handle this case well at all, anyway. We notice that "file:///foo.git" is resolvable as a path, set is_local, and set the path to "$PWD/file:///foo.git". But we still feed that to the transport code to get the list of refs (just not to fetch them). And the transport code barfs and says "I don't understand the URL scheme $PWD/file". So I'm not sure what the actual rules were meant to be, and if we actually follow them. Or whether there are even intentional rules, and it is not "what happens to work". Again, these are such silly corner cases that I suspect it is simply the case that nobody has run into them or cared. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html