From: Junio C Hamano Date: Mon, 11 Jun 2012 20:09:45 GMT Subject: Re: Git repository name-guessing corner case Message-ID: <7vwr3d625y.fsf@alter.siamese.dyndns.org> In-Reply-To: <1339442931056-7561236.post@n2.nabble.com> Joseph Chiu writes: > On the south machine, I first accidentally created the repo wizard.git.git > (note the double .git), with ... We have updated the logic around this area with b3256eb (standardize and improve lookup rules for external local repos, 2012-02-02), and this is part of v1.7.9.2 and later releases. The rule used to be (1) check with "/.git" appended, to cover the case where you access a repository with a working tree attached, (2) check with ".git" appended, and then (3) check without anything appended. It was very error prone to cause exactly the above kind of gotchas. The updated rule checks with "/.git" first andthe next possibility that is checked is the given name without modification, so if you have both wizard.git and wizard.git.git (with or without working tree): accessing with this name ... will find this repository wizard wizard.git wizard.git wizard.git wizard.git.git wizard.git.git which should be much saner.