completion: add tests showing subar checkout --detach logic
commite69fb0a16abb6412fa6c297cfe7ff43ba762a9b3
authorJacob Keller <jacob.keller@gmail.com>
Thu, 28 May 2020 18:10:35 +0000 (28 11:10 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 May 2020 19:53:24 +0000 (28 12:53 -0700)
tree6d29e95ad7fc973c9a70786130effd5953656879
parentab58e90f8b27f420659345ee462f6a69e26e379b
completion: add tests showing subar checkout --detach logic

When completing words for git switch, the completion function correctly
disables the DWIM remote branch names when in the '--detach' mode. These
DWIM remote branch names will not work when the --detach option is
specified, so it does not make sense to complete them.

git checkout, however, does not disable the completion of DWIM remote
branch names in this case.

Add test cases for both git switch and git checkout showing the expected
behavior.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9902-completion.sh