summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2020-12-05 07:10:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-12-07 21:39:53 (GMT)
commit076496457e1abe3058d48cb5c387d1face704494 (patch)
tree2ca96094c27d2427c479a0d64e32b31af05e9076 /contrib/completion
parentc5dd0c861ab0db5ad1ecaf9508bdddca83c5cc6e (diff)
downloadgit-076496457e1abe3058d48cb5c387d1face704494.zip
git-076496457e1abe3058d48cb5c387d1face704494.tar.gz
git-076496457e1abe3058d48cb5c387d1face704494.tar.bz2
completion: bash: fix gitk alias regression
Long time ago when the _git_complete helper was introduced, _gitk was replaced with __gitk_main, and a placeholder for backwards compatibility pointing to __git_wrap_main_gitk was left in place. When "__git_complete gitk __gitk_main" was called, that created the __git_wrap__gitk_main helper, which is just basically "__git_func_wrap __gitk_main" plus `complete` options. Unfortunately the commit b0a4b2d257 (completion: add support for backwards compatibility, 2012-05-19) missed a previous instance of a call to _gitk in _git_gitk So, basically we had __git_wrap__git_main -> __git_func_wrap __git_main -> __git_complete_command gitk -> _git_gitk -> _gitk -> __git_wrap__gitk_main -> __git_func_wrap __gitk_main -> __gitk_main. There was never any need to call __git_func_wrap twice. Since _git_gitk is always called inside the wrapper, it can call __gitk_main directly. And then, in commit 441ecdab37 (completion: bash: remove old compat wrappers, 2020-10-27) _gitk was removed, which triggers the following error: _git_gitk:9: command not found: _gitk Let's call the correct function: __gitk_main. Cc: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion')
-rw-r--r--contrib/completion/git-completion.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 49a6ef4..69d8272 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1806,7 +1806,7 @@ _git_fsck ()
_git_gitk ()
{
- _gitk
+ __gitk_main
}
# Lists matching symbol names from a tag (as in ctags) file.