git-completion.bash: rename to $__git_cmd_idx
commit87e629756f3bbd5125237f504f12e394c576b26d
authorDenton Liu <liu.denton@gmail.com>
Thu, 22 Apr 2021 10:00:50 +0000 (22 03:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 27 Apr 2021 06:41:07 +0000 (27 15:41 +0900)
treea4a1a8f99024b7d06ac7e3196afe27ea1153c3ba
parent8c8c8c0e1655aed8027fa04bb1998bb0301fb075
git-completion.bash: rename to $__git_cmd_idx

In e94fb44042 (git-completion.bash: pass $__git_subcommand_idx from
__git_main(), 2021-03-24), the $__git_subcommand_idx variable was
introduced. Naming it after the index of the subcommand is needlessly
confusing as, when this variable is used, it is in the completion
functions for commands (e.g. _git_remote()) where for `git remote add`,
the `remote` is referred to as the command and `add` is referred to as
the subcommand.

Rename this variable so that it's obvious it's about git commands. While
we're at it, shorten up its name so that it's still readable without
being a handful to type.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash