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 <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Felipe Contreras committed May 19, 2012 at 04:41 UTC 7f02f3d7ecdda983f229b16f80e7c494fb2d3510
2 files changed +6 -6
contrib/completion/git-completion.bash
+5 -5
@@ -2599,7 +2599,7 @@ _git_whatchanged ()
2599 _git_log
2600 }
2601
2602 -_git ()
2602 +_main_git ()
2603 {
2604 local i c=1 command __git_dir
2605
@@ -2650,7 +2650,7 @@ _git ()
2650 fi
2651 }
2652
2653 -_gitk ()
2653 +_main_gitk ()
2654 {
2655 __git_has_doubledash && return
2656
@@ -2702,13 +2702,13 @@ __git_complete ()
2702 || complete -o default -o nospace -F $wrapper $1
2703 }
2704
2705 -__git_complete git _git
2706 -__git_complete gitk _gitk
2705 +__git_complete git _main_git
2706 +__git_complete gitk _main_gitk
2707
2708 # The following are necessary only for Cygwin, and only are needed
2709 # when the user has tab-completed the executable name and consequently
2710 # included the '.exe' suffix.
2711 #
2712 if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then
2713 -__git_complete git.exe _git
2713 +__git_complete git.exe _main_git
2714 fi
t/t9902-completion.sh
+1 -1
@@ -63,7 +63,7 @@ run_completion ()
63 local _cword
64 _words=( $1 )
65 (( _cword = ${#_words[@]} - 1 ))
66 - __git_wrap_git && print_comp
66 + __git_wrap_main_git && print_comp
67 }
68
69 test_completion ()