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

Re: [PATCH] completion: optionally disable checkout DWIM

From
Jason Karns <jason.karns@gmail.com>
Date
Jun 29, 2017, 20:03 UTC
Message-ID
<CAKNmmv16WG=8=66B8+paiRsjqFKjRKCLPyjEaHkNPsXaOhBCYQ@mail.gmail.com>
Show 7 quoted lines
> We could discern between more than just empty vs. non-empty state of
> the environment variable, e.g.:
>
>  - if empty/unset, then include "DWIM" suggestions.
>  - if set to 'config', then query the 'completion.checkoutNoGuess'
>    configuration variable, and omit "DWIM" suggestions if its true.
>  - if set to something else, then omit "DWIM" suggestions.
> Then users can themselves decide, whether the per-repo configurability
> is worth the overhead of running 'git config'.

I would _definitely_ appreciate this feature. Firstly, thank you for the addition of the environment variable. It is indeed much better than the --no-guess flag.

However, I'm in a situation where I very much prefer the DWIM behavior for nearly all of my repos. However, a very few repos have LOTS of branches. And I only wish to disable DWIM in those few repos.

I attempted to create an alias (`git config alias.co 'checkout --no-guess'`) in those specific repos. However, that turned out to be foolish since I believe the alias parsing doesn't occur until _after_ the shell completion script runs (thus the --no-guess is not actually present in the command parsed by the completion script).

So I'm back to very much wanting the ability to disable DWIM repo-specific via git-config; and am willing to pay the git-config tax as necessary.

Message 1 of 1 in “Re: [PATCH] completion: optionally disable checkout DWIM”
  1. Jason KarnsJun 29, 2017

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.