Re: git switch/restore, still experimental?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> 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).

It would have been a stronger argument to favor --new if we had "git
branch --new <branchname>", but that is not the case.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux