On Tue, Jan 31, 2012 at 03:55:01PM -0600, Jonathan Nieder wrote: > >> 2) As a naive user, I would expect (A) to give a different result > >> from (B). > > > > Why? > > Normally git commands expect me to be in (possibly a deeply nested > subdirectory) of the worktree. The typical case is a non-bare > repository. I have been taught that it walks to the toplevel and > finds a ".git" directory. > > By contrast, the path passed to git transport commands like "git fetch > otherhost:/foo/bar/baz.git" is a path to the git repository metadata. > I am not allowed to pass a path to a subdirectory, for example. True. But I consider that to make the walk-backwards-from-pwd case simply a superset. That is, in (A) we are walking backwards and trying to apply the lookup rule from (B) individually to each directory we consider (though even that is not entirely true, as we don't look for parallel "$PWD.git" directories in the walk). I'll admit I don't care that much, though. This is extremely unlikely to come up. The real issue is fixing the fact that we prefer "foo.git" to "foo", even when the user told us "foo". I am content to leave the rest of it as-is, which is what my original patch did. -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