From: Junio C Hamano <gitster@pobox.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Michael J Gruber <git@drmicha.warpmail.net>,
Jardel Weyrich <jweyrich@gmail.com>,
Sascha Cunz <sascha-ml@babbelbox.org>,
"git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [BUG] Possible bug in `remote set-url --add --push`
Date: Wed, 16 Jan 2013 12:01:25 -0800 [thread overview]
Message-ID: <7vr4lkx5gq.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <m2ip6x0vtk.fsf@igel.home> (Andreas Schwab's message of "Wed, 16 Jan 2013 20:30:47 +0100")
Andreas Schwab <schwab@linux-m68k.org> writes:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> I actually think my earlier "it shouldn't be the same (push)" is not
>> needed and probably is actively wrong. Just like you can tell
>> between
>>
>> (only one .url) (both .url and .pushurl)
>>
>> origin there (fetch/push) origin there (fetch)
>> origin there (push)
>
> What should happen when you have a .pushinsteadof configured that
> modifies .url for pushing?
I think push should work like this:
* the user gives us a nickname;
* we look at remote.$nickname.pushurl (and if there isn't,
remote.$nickname.url) to decide the logical URLs to push to;
* for each logical URL we decided to push, we look at
url.*.pushInsteadOf to see if there is one that match the $URL
(and if there isn't url.*.insteadOf), and map the logical URL to
the final destination.
So that we can instruct "push" to push, when pushing into a
repository that logically resides at git://git.k.org/pub/,
to instead push into the repository via git-over-ssh, e.g.
[remote "korg"]
url = git://git.k.org/pub/scm/git/git.git/
[url "git.k.org:/pub/"]
pushInsteadOf = git://git.k.org/pub/
without affecting the fetching side.
As I said in a separate message, the above "fetch/push" vs "fetch"
and "push" distinction is not descriptive enough to express the post
rewriting that is done with insteadOf; it only helps debugging
misconfiguration between .url vs .pushurl, which may be better than
the status quo but is not ideal.
next prev parent reply other threads:[~2013-01-16 20:01 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-12 5:44 [BUG] Possible bug in `remote set-url --add --push` Jardel Weyrich
2013-01-12 7:10 ` Junio C Hamano
2013-01-12 8:09 ` Jardel Weyrich
2013-01-12 8:23 ` Junio C Hamano
2013-01-12 8:44 ` Sascha Cunz
2013-01-12 9:33 ` Jardel Weyrich
2013-01-14 13:07 ` Michael J Gruber
2013-01-14 16:41 ` Jonathan Nieder
2013-01-14 19:09 ` Junio C Hamano
2013-01-15 5:20 ` Jardel Weyrich
2013-01-15 6:22 ` Junio C Hamano
2013-01-15 6:39 ` Junio C Hamano
2013-01-15 9:44 ` Michael J Gruber
2013-01-15 15:53 ` Junio C Hamano
2013-01-16 8:46 ` Michael J Gruber
2013-01-16 15:50 ` Junio C Hamano
2013-01-16 16:19 ` Michael J Gruber
2013-01-16 19:30 ` Andreas Schwab
2013-01-16 20:01 ` Junio C Hamano [this message]
2013-01-16 10:14 ` [PATCH] git-remote: distinguish between default and configured URLs Michael J Gruber
2013-01-16 10:27 ` Michael J Gruber
2013-01-16 10:42 ` John Keeping
2013-01-16 12:45 ` Michael J Gruber
2013-01-16 13:04 ` John Keeping
2013-01-16 19:19 ` Junio C Hamano
2013-01-16 16:15 ` [BUG] Possible bug in `remote set-url --add --push` Phil Hord
2013-01-16 16:24 ` Michael J Gruber
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vr4lkx5gq.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=jweyrich@gmail.com \
--cc=sascha-ml@babbelbox.org \
--cc=schwab@linux-m68k.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).