]> git.ipfire.org Git - thirdparty/git.git/commit - contrib/completion/git-completion.bash
checkout: learn to respect checkout.guess
authorDenton Liu <liu.denton@gmail.com>
Thu, 8 Oct 2020 05:48:15 +0000 (22:48 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Oct 2020 16:25:29 +0000 (09:25 -0700)
commit64f1f58fe7c0837bd0ae56ba83add5e1b84c54d3
tree9ec6d813813db2e42f52855b96b0fb5abbe72a40
parentef09e7ddf3e77960ea24ea1580439fb725b4063a
checkout: learn to respect checkout.guess

The current behavior of git checkout/switch is that --guess is currently
enabled by default. However, some users may not wish for this to happen
automatically. Instead of forcing users to specify --no-guess manually
each time, teach these commands the checkout.guess configuration
variable that gives users the option to set a default behavior.

Teach the completion script to recognize the new config variable and
disable DWIM logic if it is set to false.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/checkout.txt
Documentation/git-checkout.txt
Documentation/git-switch.txt
builtin/checkout.c
contrib/completion/git-completion.bash
t/t2024-checkout-dwim.sh
t/t2060-switch.sh
t/t9902-completion.sh