All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Elijah Newren" <newren@gmail.com>,
	"Gábor Farkas" <gabor.farkas@gmail.com>,
	"Git Mailing List" <git@vger.kernel.org>
Subject: Re: git switch/restore, still experimental?
Date: Mon, 10 May 2021 13:04:48 +0200	[thread overview]
Message-ID: <87zgx2u9pu.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <87pmy4uqhz.fsf@evledraar.gmail.com>


On Thu, May 06 2021, Ævar Arnfjörð Bjarmason wrote:

> On Thu, May 06 2021, Junio C Hamano wrote:

*Poke*

>> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>>
>>> I mean, I see why. You don't want a typo of "master" as "maaster" to
>>> create a new "maaster" branch, so really that's out. But it really
>>> should be:
>>>
>>>     # -n or -N for --new / --new --force (the latter just in case of a
>>>     # race, and just for consistency)
>>>     git switch -n doesnotexist
>>
>> I do not see why --new is better than --create; we did choose not to
>> reuse --branch from "checkout" and I remember that was a deliberate
>> decision (i.e. once split into "switch" and "restore", "switch"
>> becomes only about branches, so unlike in the context of "checkout",
>> in the context of "switch", the word "branch" adds a lot less value,
>> and certainly does not signal we are creating a branch and switching
>> to it).
>
> I don't think --new is better than --create when considered in
> isolation. I happen to think --create is better.
>
> What I'm arguing is that we should be aiming for some consistency in the
> command-set. In this case the relatively small change of
> s/--create/--new/ server so make the rest consistent. I.e. the branch
> and switch commands can mirror each other in the ways that matter for
> these common operations of create/copy/move.
>
>> It would have been a stronger argument to favor --new if we had "git
>> branch --new <branchname>", but that is not the case.
>
> The argument is that switch's experimental design squats on 2x other
> options, so changing -c to -n so we can make -c and -m do the same thing
> is better.

Whatever the merit of the argument I'm putting forward here, it would be
useful to get some idea of whether you'd be categorically opposed to
changing the interface of switch/restore in breaking ways even though
they've been marked as "THIS COMMAND IS EXPERIMENTAL".

Of course any series to implement what I suggested in
<877dkdwgfe.fsf@evledraar.gmail.com> would need to stand on its own
merits.

I'm not planning on working on that since I expect the response will be
at best "neat, but that ship has sailed", but if that's not the case...

  reply	other threads:[~2021-05-10 11:20 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04 10:32 git switch/restore, still experimental? Gábor Farkas
2021-05-04 19:54 ` Felipe Contreras
2021-05-05  3:46 ` Elijah Newren
2021-05-05  4:01   ` Eric Sunshine
2021-05-05 11:09   ` Ævar Arnfjörð Bjarmason
2021-05-05 17:46     ` Felipe Contreras
2021-05-05 19:26       ` Sergey Organov
2021-05-05 19:48     ` Sergey Organov
2021-05-06  1:39       ` Junio C Hamano
2021-05-06 15:19         ` Sergey Organov
2021-05-06 10:05       ` Ævar Arnfjörð Bjarmason
2021-05-06 14:29         ` Sergey Organov
2021-05-06  2:16     ` Junio C Hamano
2021-05-06 10:02       ` Ævar Arnfjörð Bjarmason
2021-05-10 11:04         ` Ævar Arnfjörð Bjarmason [this message]
2021-05-10 18:27           ` Junio C Hamano
2021-05-06 11:00       ` Felipe Contreras
2021-05-06 15:26         ` Ævar Arnfjörð Bjarmason
2021-05-06 21:55           ` Felipe Contreras
2021-05-10 10:58             ` Ævar Arnfjörð Bjarmason
2021-05-11  7:15               ` Felipe Contreras
2021-05-05 14:18   ` Johannes Schindelin
2021-05-05 14:26     ` Randall S. Becker
2021-05-06  1:15       ` Junio C Hamano
2021-05-05 17:52     ` Felipe Contreras

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=87zgx2u9pu.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=gabor.farkas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.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.