Re: [PATCH] completion: optionally disable checkout DWIM

From: Jason Karns <hidden>
Date: 2017-06-29 20:03:39

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help