completion: add remaining flags to checkout

In the commits 1fc458d9 (builtin/checkout: add --recurse-submodules switch, 2017-03-14), 08d595dc (checkout: add --ignore-skip-worktree-bits in sparse checkout mode, 2013-04-13) and 32669671 (checkout: introduce --detach synonym for "git checkout foo^{commit}", 2011-02-08) checkout gained new flags but the completion was not updated, although these flags are useful completions. Add them. The flags --force and --ignore-other-worktrees are not added as they are potentially dangerous. The flags --progress and --no-progress are only useful for scripting and are therefore also not included. Signed-off-by: Thomas Braun <thomas.braun@virtuell-zuhause.de> Reviewed-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thomas Braun committed Oct 24, 2017 at 15:19 UTC 6357d9d00405ae16d63610ec2d049e0ca7e391ea
2 files changed +6 -1
contrib/completion/git-completion.bash
+2 -1
@@ -1250,7 +1250,8 @@ _git_checkout ()
1250 --*)
1251 __gitcomp "
1252 --quiet --ours --theirs --track --no-track --merge
1253 - --conflict= --orphan --patch
1253 + --conflict= --orphan --patch --detach --ignore-skip-worktree-bits
1254 + --recurse-submodules --no-recurse-submodules
1255 "
1256 ;;
1257 *)
t/t9902-completion.sh
+4
@@ -1245,6 +1245,10 @@ test_expect_success 'double dash "git checkout"' '
1245 --conflict=
1246 --orphan Z
1247 --patch Z
1248 + --detach Z
1249 + --ignore-skip-worktree-bits Z
1250 + --recurse-submodules Z
1251 + --no-recurse-submodules Z
1252 EOF
1253 '
1254