From: Michael J Gruber <git@drmicha.warpmail.net>
To: Phil Hord <phil.hord@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
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 17:24:29 +0100 [thread overview]
Message-ID: <50F6D43D.2000509@drmicha.warpmail.net> (raw)
In-Reply-To: <CABURp0rR_wB6vcjrZajQU_=AVVvBq-aTGpggh5XxdCMYis3-ag@mail.gmail.com>
Phil Hord venit, vidit, dixit 16.01.2013 17:15:
> On Tue, Jan 15, 2013 at 10:53 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> Michael J Gruber <git@drmicha.warpmail.net> writes:
>>
>>> That being said, I don't mind changing the behaviour of set-url.
>>
>> I do not think we want to change the behaviour of set-url.
>
> I agree with Michael that changing the set-url behavior would be
> appropriate here. If I say "--add" this pushUrl, don't I mean to
> create an additional url which is pushed to?
I said I wouldn't mind, I didn't vote for it.
> I agree that it makes the config situation messy; this is currently a
> "clean" sequence, in that it leaves the config unchanged after both
> steps are completed:
>
> git remote set-url --add --push origin /tmp/foo
> git remote set-url --delete --push origin /tmp/foo
>
> If the behavior is changed like Michael suggested, it would not leave
> the config clean (unless heroic steps were taken to keep track). But
> I'm not sure that's such a bad thing. In simple command sequences,
> the results would be clean and the only behavior change is that the
> initial "--add" really acts like "add" and not "replace". But more
> complex sequences could be devised which were affected by this change.
>
> I'm curious, Junio. Do you think the set-url behavior is correct
> as-is, or that changing it will cause breakage for some workflows, or
> that it complicates the operation too much for people who are already
> used to the config layout?
For "set url --add --push" on top of a push url only being defaulted
from a fetch url, both behaviours (replace or add, i.e. current or new)
make sense to me. So the questions are:
- Is it worth and possible changing?
- How to best describe it in "remote -v" and "remote show" output?
My patch answered to "no" to the first question and answers the second
one in cases where (push)insteadof is not used to transform one fetch
config into two different urls for fetch and push. I think :)
Michael
prev parent reply other threads:[~2013-01-16 16:24 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
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 [this message]
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=50F6D43D.2000509@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jweyrich@gmail.com \
--cc=phil.hord@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.
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 NNTP newsgroup(s).