git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Denton LiuNext: Denton Liu
Message 11 of 14 in “checkout: learn the checkout.guess config variable”
  1. 0/2 checkout: learn the checkout.guess config variableDenton Liu, Oct 4, 2020
  2. 1/2 Documentation/config/checkout: replace sq with backticksDenton Liu, Oct 4, 2020
  3. 2/2 checkout: learn to respect checkout.guessDenton Liu, Oct 4, 2020
  4. Junio C HamanoOct 4, 2020
  5. Denton LiuOct 6, 2020
  6. Junio C HamanoOct 6, 2020
  7. Johannes SchindelinOct 6, 2020
  8. 0/2 checkout: learn the checkout.guess config variableDenton Liu, Oct 7, 2020
  9. 1/2 Documentation/config/checkout: replace sq with backticksDenton Liu, Oct 7, 2020
  10. 2/2 checkout: learn to respect checkout.guessDenton Liu, Oct 7, 2020
  11. Junio C HamanoOct 7, 2020
  12. 0/2 checkout: learn the checkout.guess config variableDenton Liu, Oct 8, 2020
  13. 1/2 Documentation/config/checkout: replace sq with backticksDenton Liu, Oct 8, 2020
  14. 2/2 checkout: learn to respect checkout.guessDenton Liu, Oct 8, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.