threads / patch / 46287

patchRe: [PATCH] completion: optionally disable checkout DWIM

Subject: Re: [PATCH] completion: optionally disable checkout DWIM

## tl;dr

One message between Jun 29, 2017 and Jun 29, 2017. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Jason Karns· Jun 29, 2017, 20:03 UTC · lore
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.

← back to recent threads