completion: remove 'help' duplicate from porcelain commands
authorSZEDER Gábor <szeder@ira.uka.de>
Wed, 14 Nov 2012 00:49:30 +0000 (01:49 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Nov 2012 21:45:38 +0000 (13:45 -0800)
The list of all git commands is computed from the output of 'git help
-a', which already includes 'help', so there is no need to explicitly
add it once more when computing the list of porcelain commands.

Note that 'help' wasn't actually offered twice because of this,
because Bash filters duplicates from possible completion words.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash

index be800e09bdf0656951c415105e0d32ce0b0edf9e..5e23ec074bc12281e4797a4b1ac16a2d478693ed 100644 (file)
@@ -585,7 +585,7 @@ __git_list_porcelain_commands ()
 {
        local i IFS=" "$'\n'
        __git_compute_all_commands
-       for i in "help" $__git_all_commands
+       for i in $__git_all_commands
        do
                case $i in
                *--*)             : helper pattern;;