{"thread":{"id":"30790","subject":"[PATCH] completion: put main git and gitk completion functions back into git namespace","startedAt":"2012-06-13T08:08:50Z","lastAt":"2012-06-13T08:08:50Z","messageCount":1,"participants":["SZEDER Gábor"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"193528","messageId":"1339574930-28149-1-git-send-email-szeder@ira.uka.de","threadId":"30790","inReplyTo":null,"subject":"[PATCH] completion: put main git and gitk completion functions back into git namespace","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2012-06-13T08:08:50Z","receivedAt":"2012-06-13T08:08:50Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Commit 7f02f3d7 (completion: rename internal helpers _git and _gitk,\n2012-05-19) renamed said functions to _main_git() and _main_gitk(),\nrespectively.  By convention the name of our git-completion-specific\nfunctions start with '_git' or '__git' prefix, so rename those\nfunctions once again to put them back into our \"namespace\".  Use the\ntwo underscore prefix, because _git_main() could be mistaken for the\ncompletion function of the (not yet existing) 'git main' command.\n\nSigned-off-by: SZEDER Gábor <szeder@ira.uka.de>\n---\n contrib/completion/git-completion.bash | 14 +++++++-------\n t/t9902-completion.sh                  |  2 +-\n 2 files changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 1689f995..d486948a 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -2597,7 +2597,7 @@ _git_whatchanged ()\n \t_git_log\n }\n \n-_main_git ()\n+__git_main ()\n {\n \tlocal i c=1 command __git_dir\n \n@@ -2648,7 +2648,7 @@ _main_git ()\n \tfi\n }\n \n-_main_gitk ()\n+__gitk_main ()\n {\n \t__git_has_doubledash && return\n \n@@ -2703,22 +2703,22 @@ __git_complete ()\n # wrapper for backwards compatibility\n _git ()\n {\n-\t__git_wrap_main_git\n+\t__git_wrap__git_main\n }\n \n # wrapper for backwards compatibility\n _gitk ()\n {\n-\t__git_wrap_main_gitk\n+\t__git_wrap__gitk_main\n }\n \n-__git_complete git _main_git\n-__git_complete gitk _main_gitk\n+__git_complete git __git_main\n+__git_complete gitk __gitk_main\n \n # The following are necessary only for Cygwin, and only are needed\n # when the user has tab-completed the executable name and consequently\n # included the '.exe' suffix.\n #\n if [ Cygwin = \"$(uname -o 2>/dev/null)\" ]; then\n-__git_complete git.exe _main_git\n+__git_complete git.exe __git_main\n fi\ndiff --git a/t/t9902-completion.sh b/t/t9902-completion.sh\nindex 9a80c609..256e6a0b 100755\n--- a/t/t9902-completion.sh\n+++ b/t/t9902-completion.sh\n@@ -63,7 +63,7 @@ run_completion ()\n \tlocal _cword\n \t_words=( $1 )\n \t(( _cword = ${#_words[@]} - 1 ))\n-\t__git_wrap_main_git && print_comp\n+\t__git_wrap__git_main && print_comp\n }\n \n test_completion ()\n-- \n1.7.11.rc2.65.g240b4fe\n"}]}