All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Anastas Dancha <anapsix@random.io>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] remote: allow adding remote w same name as alias
Date: Fri, 19 Dec 2014 17:30:15 +0100	[thread overview]
Message-ID: <54945297.3010409@drmicha.warpmail.net> (raw)
In-Reply-To: <CAChhagA7eZ_7=g-xhAusZ1NX085KLjPDRbgJwx00F4pgOURXnQ@mail.gmail.com>

Anastas Dancha schrieb am 19.12.2014 um 16:44:
> Hello Johannes,
> 
> 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?
>>
>> 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
> 

OK, I'll repeat it again: We cannot allow that.

"git push" can take a url or a remote as a parameter. Which one is it if
you have a remote and a url (alias) with the same name?

Michael

  reply	other threads:[~2014-12-19 16:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16  2:30 [PATCH] remote: allow adding remote w same name as alias Anastas Dancha
2014-12-16  9:01 ` Johannes Schindelin
2014-12-16 14:57   ` Anastas Dancha
2014-12-19  9:37     ` Johannes Schindelin
2014-12-19 15:44       ` Anastas Dancha
2014-12-19 16:30         ` Michael J Gruber [this message]
2014-12-20 20:57           ` Anastas Dancha
2014-12-21 20:40         ` Johannes Schindelin
2014-12-16  9:33 ` Michael J Gruber
2014-12-22 17:06 ` [PATCH 0/2] Let `git remote add` play nicer with url.<url>.insteadOf Johannes Schindelin
2014-12-22 17:06   ` [PATCH 1/2] git remote add: allow re-adding remotes with the same URL Johannes Schindelin
2014-12-22 17:49     ` Junio C Hamano
2014-12-23 13:25       ` Johannes Schindelin
     [not found]         ` <CAPc5daXcXs+Sw8jr65dmLnpf6LQ6Lr34y80bxSf2AhhFyXa_mQ@mail.gmail.com>
2014-12-23 18:26           ` Johannes Schindelin
2014-12-23 18:51             ` Junio C Hamano
2014-12-22 17:06   ` [PATCH 2/2] Add a regression test for 'git remote add <existing> <same-url>' Johannes Schindelin
2014-12-23 13:24 ` [PATCH v2 0/2] Let `git remote add` play nicer with url.<url>.insteadOf Johannes Schindelin
2014-12-23 13:25   ` [PATCH v2 1/2] git remote: allow adding remotes agreeing with url.<...>.insteadOf Johannes Schindelin
2014-12-23 13:25   ` [PATCH v2 2/2] Add a regression test for 'git remote add <existing> <same-url>' Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54945297.3010409@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=anapsix@random.io \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.