Re: [PATCH] doc: use "git switch -c" rather than "git checkout -b" consistently

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

 



On Sun, Jan 8, 2023 at 11:36 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
> > From: Yutaro Ohno <yutaro.ono.418@xxxxxxxxx>
> > Subject: Re: [PATCH] doc: use "git switch -c" rather than "git checkout -b" consistently
>
> Hmph.  When two things work equally well, is it a good idea to
> describe only one "consistently", or mention both that can be used
> pretty much interchangeably in different places?  I am not 100% sure
> "consistently" is a good thing here.
>
> Thoughts from others?

Perhaps if the patch was sold as filling in a gap left by 328c6cb853
(doc: promote "git switch", 2019-03-29) it would be more palatable.

It does feel a bit strange that within the git-checkout documentation,
this patch is replacing an example invocation of git-checkout with an
invocation of git-switch. However, as the list of commands the patch
touches is given merely as examples one might use, then I could see
git-switch being prepended to the list rather than entirely replacing
git-checkout. For instance:

    If we have not yet moved away from commit `f`,
    any of these will create a reference to it:

    ------------
    $ git switch -c foo     <1>
    $ git checkout -b foo   <1>
    $ git branch foo        <2>
    $ git tag foo           <3>
    ------------



[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