From: John Keeping <john@keeping.me.uk>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: John Keeping <john@keeping.me.uk>,
git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Jardel Weyrich <jweyrich@gmail.com>,
Sascha Cunz <sascha-ml@babbelbox.org>
Subject: Re: [PATCH] git-remote: distinguish between default and configured URLs
Date: Wed, 16 Jan 2013 13:04:25 +0000 [thread overview]
Message-ID: <20130116130425.GB15125@farnsworth.metanate.com> (raw)
In-Reply-To: <50F6A0F0.70800@drmicha.warpmail.net>
On Wed, Jan 16, 2013 at 01:45:36PM +0100, Michael J Gruber wrote:
> John Keeping venit, vidit, dixit 16.01.2013 11:42:
>> On Wed, Jan 16, 2013 at 11:14:48AM +0100, Michael J Gruber wrote:
>>> The current output of "git remote -v" does not distinguish between
>>> explicitly configured push URLs and those coming from fetch lines.
>>>
>>> Revise the output so so that URLs are distinguished by their labels:
>>>
>>> (fetch): fetch config used for fetching only
>>> (fetch/push): fetch config used for fetching and pushing
>>> (fetch fallback/push): fetch config used for pushing only
>>> (fetch fallback): fetch config which is unused
>>> (push): push config used for pushing
>>
>> How does this interact with url.<base>.pushInsteadOf?
>>
>> I have a global rule to convert git:// URLs to ssh:// for pushing:
>>
>> [url "git@example.com:"]
>> pushInsteadOf = git://example.com/
>>
>> With only a URL configured for a remote (no pushURL), I get (with Git
>> 1.8.1):
>>
>> origin git://example.com/repository.git (fetch)
>> origin git@example.com:repository.git (push)
>>
>> From the original discussion in this thread, I think that if I did
>> "git remote set-url --add --push <url>" it would replace my current push
>> URL, and the change to "(fetch/push)" doesn't help in this case.
>>
>> Should there be special handling for pushInsteadOf here?
>
> Thanks for pointing out this case.
>
> The new code would still list this as two separate URLs because they
> really are; whether they come from two config entries or from one being
> subject to two different insteadof expansions is completely opaque to
> builtin/remote.c, unless remote.c learns to stick that additional info
> into struct remote somehow.
OK. I like the new format, I was just wondering if it was a simple
enhancement to indicate a pushInsteadOf URL specially as well.
> In short, the separate listing is correct, but in this case there's no
> improvement in readability.
>
> We could still say that (push)InsteadOf is a power feature and we want
> to help the "normal" case, but it's a bit half-assed. In the end we
> might even have to keep track of insteadof-expansions and display those
> also (i.e. "expanded from...")?
Given that it's not a trivial enhancement, I'd accept the argument that
someone who has configured pushInsteadOf can be expected to understand
the underlying git-config semantics of "git remote set-url".
John
next prev parent reply other threads:[~2013-01-16 13:04 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
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 [this message]
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=20130116130425.GB15125@farnsworth.metanate.com \
--to=john@keeping.me.uk \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jweyrich@gmail.com \
--cc=sascha-ml@babbelbox.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).