Re: [BUG] Possible bug in `remote set-url --add --push`
- From
Phil Hord <phil.hord@gmail.com>
- Date
- Jan 16, 2013, 16:15 UTC
- Message-ID
- <CABURp0rR_wB6vcjrZajQU_=AVVvBq-aTGpggh5XxdCMYis3-ag@mail.gmail.com>
- In-Reply-To
- <7v4nii5tp2.fsf@alter.siamese.dyndns.org>
On Tue, Jan 15, 2013 at 10:53 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
> 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 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?
Phil