All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Kirill Likhodedov <kirill.likhodedov@jetbrains.com>
Cc: git@vger.kernel.org
Subject: Re: Bug? url.insteadOf overwrites remote.pushUrl
Date: Fri, 14 Oct 2011 17:35:25 +0200	[thread overview]
Message-ID: <4E9856BD.3010807@drmicha.warpmail.net> (raw)
In-Reply-To: <CAB6D58F-A3C9-4532-A9CC-10E43CD34E4E@jetbrains.com>

Kirill Likhodedov venit, vidit, dixit 14.10.2011 15:55:
> 
> I've found that defining url.<base>.insteadOf overrides explicit
> remote.<name>.pushUrl.

It doesn't really override it. It is applied to it, i.e. transforms it.

> On the other hand, pushInsteadOf doesn't
> override explicit pushUrl. Is it a bug?

That is as described in the thread (thanks for linking to it).

> # cat .git/config [remote "origin"] fetch =
> +refs/heads/*:refs/remotes/origin/* url = github.com/klikh/Test.git 
> pushUrl = jetbrains.com/klikh/Test.git [url "http://"] insteadOf=jet
> 
> # git remote -v origin	github.com/klikh/Test.git (fetch) origin
> http://brains.com/klikh/Test.git (push)

The idea of "pushInsteadOf" was that, instead of having to define url
and pushurl separately, you can use different rules, say

github -> git://github.com (fetch)
github -> https://username@github.com (push)
github/ -> git@github.com: (push)

used with "url = github/otheruser/repo.git" alone, without pushurl.

pushurl predates pushinsteadof, and when the latter was introduced, one
could have argued for or against "insteadof" being applied to pushurls.
But that was necessary before, and existing behavior at the time when
pushinsteadof was introduced. So, I don't see a bug, nor anything we
could change now, though arguably most people use either pushinstead of
or pushurl, but not both.

Cheers,
Michael

  reply	other threads:[~2011-10-14 15:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-14 13:55 Bug? url.insteadOf overwrites remote.pushUrl Kirill Likhodedov
2011-10-14 15:35 ` Michael J Gruber [this message]
2011-10-14 19:16   ` Kirill Likhodedov

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=4E9856BD.3010807@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=kirill.likhodedov@jetbrains.com \
    /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.