Skip to content

Commit 7f02f3d

Browse files
felipecgitster
authored andcommitted
completion: rename internal helpers _git and _gitk
Would be useful to provide backwards compatibility for _git. Also, zsh completion uses _git, and it cannot be changed. Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6b179ad commit 7f02f3d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

contrib/completion/git-completion.bash

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2599,7 +2599,7 @@ _git_whatchanged ()
25992599
_git_log
26002600
}
26012601

2602-
_git ()
2602+
_main_git ()
26032603
{
26042604
local i c=1 command __git_dir
26052605

@@ -2650,7 +2650,7 @@ _git ()
26502650
fi
26512651
}
26522652

2653-
_gitk ()
2653+
_main_gitk ()
26542654
{
26552655
__git_has_doubledash && return
26562656

@@ -2702,13 +2702,13 @@ __git_complete ()
27022702
|| complete -o default -o nospace -F $wrapper $1
27032703
}
27042704

2705-
__git_complete git _git
2706-
__git_complete gitk _gitk
2705+
__git_complete git _main_git
2706+
__git_complete gitk _main_gitk
27072707

27082708
# The following are necessary only for Cygwin, and only are needed
27092709
# when the user has tab-completed the executable name and consequently
27102710
# included the '.exe' suffix.
27112711
#
27122712
if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then
2713-
__git_complete git.exe _git
2713+
__git_complete git.exe _main_git
27142714
fi

t/t9902-completion.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ run_completion ()
6363
local _cword
6464
_words=( $1 )
6565
(( _cword = ${#_words[@]} - 1 ))
66-
__git_wrap_git && print_comp
66+
__git_wrap_main_git && print_comp
6767
}
6868

6969
test_completion ()

0 commit comments

Comments
 (0)