From: Anastas Dancha Date: Fri, 19 Dec 2014 15:44:56 GMT Subject: Re: [PATCH] remote: allow adding remote w same name as alias Message-ID: In-Reply-To: Hello Johannes, On Fri, Dec 19, 2014 at 4:37 AM, Johannes Schindelin wrote: > [...] > There is one bit left to clarify: let me guess, you have a $HOME/.gitconfig > like this: > > [url "anastas@company.com"] > insteadOf = backup > pushInsteadOf = backup > > and then you want to add the "backup" remote in a Git working directory > like this: > > git remote add backup me@my-laptop.local > > but my suggested fix will still disallow this because the URL does not > match the url.anastas@company.com.insteadOf? > > Ciao, > Johannes Precisely that. In fact, it will not work even if you do any of these: git remote add backup anastas@company.com git remote add backup anything@anyhost.com git remote add backup backup The original / current code and your suggested fix - both exhibit similar behaviour with the use cases I've described above. Thanks, Anastas