Re: [PATCH] remote: allow adding remote w same name as alias
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 21, 2014, 20:40 UTC
- Message-ID
- <alpine.DEB.1.00.1412212139430.21312@s15462909.onlinehome-server.info>
- In-Reply-To
- <CAChhagA7eZ_7=g-xhAusZ1NX085KLjPDRbgJwx00F4pgOURXnQ@mail.gmail.com>
Hi Anastas,
On Fri, 19 Dec 2014, Anastas Dancha wrote:
Show 21 quoted lines
> On Fri, Dec 19, 2014 at 4:37 AM, Johannes Schindelin > <Johannes.Schindelin@gmx.de> 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? > > Precisely that. In fact, it will not work even if you do any of these: > > git remote add backup anastas@company.com
This will succeed after applying my suggested change. I even tested this ;-)
Ciao, Johannes