git-commit-vandalism/contrib/completion
Denton Liu aeeb978ba6 completion: teach archive to use __gitcomp_builtin
Currently, _git_archive() uses a hardcoded list of options for its
completion. However, we can use __gitcomp_builtin() to get a dynamically
generated list of completions instead.

Teach _git_archive() to use __gitcomp_builtin() so that newly
implemented options in archive will be automatically completed without
any mucking around in git-completion.bash. While we're at it, teach it
to complete the missing `--worktree-attributes` option as well.

Unfortunately, since some args are passed through from cmd_archive() to
write_archive() (which calls parse_archive_args()), there's no way that a
`--git-completion-helper` arg can end up reaching parse_archive_args()
since the first call to parse_options() will end up calling exit(0). As
a result, we have to carry the options supported by write_archive() in
the hardcoded string.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-09-12 13:45:29 -07:00
..
.gitattributes
git-completion.bash completion: teach archive to use __gitcomp_builtin 2019-09-12 13:45:29 -07:00
git-completion.tcsh
git-completion.zsh zsh: complete unquoted paths with spaces correctly 2019-01-03 11:48:13 -08:00
git-prompt.sh git-prompt: improve cherry-pick/revert detection 2019-07-01 12:39:44 -07:00