Re: [PATCH v2 2/2] checkout: learn to respect checkout.guess
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 7, 2020, 16:47 UTC
- Message-ID
- <xmqqy2ki2daq.fsf@gitster.c.googlers.com>
- In-Reply-To
- <2678680a08e025e9652c6769501dbc604560394b.1602047333.git.liu.denton@gmail.com>
Denton Liu <liu.denton@gmail.com> writes:
Show 25 quoted lines
> diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt > index afa5c11fd3..28f656d04e 100644 > --- a/Documentation/git-checkout.txt > +++ b/Documentation/git-checkout.txt > @@ -193,6 +193,9 @@ branches from there if `<branch>` is ambiguous but exists on the > linkgit:git-config[1]. > + > Use `--no-guess` to disable this. > ++ > +The default behavior can be set via the `checkout.guess` configuration > +variable. > > -l:: > Create the new branch's reflog; see linkgit:git-branch[1] for > diff --git a/Documentation/git-switch.txt b/Documentation/git-switch.txt > index 3759c3a265..5c438cd505 100644 > --- a/Documentation/git-switch.txt > +++ b/Documentation/git-switch.txt > @@ -103,6 +103,9 @@ ambiguous but exists on the 'origin' remote. See also > `checkout.defaultRemote` in linkgit:git-config[1]. > + > `--guess` is the default behavior. Use `--no-guess` to disable it. > ++ > +The default behavior can be set via the `checkout.guess` configuration > +variable.
Contrasting the above two, one cannot help but notice that it is totally unclear how "git checkout" that is not explicitly told by command line or configuration behaves. Perhaps "`--guess` is the default behaviour." needs to be transplated from the description for "git switch" to clarify?
This is not a new issue, but is made stand out even more prominently due to the addition.
Thanks.