Skip to content

Commit

Permalink
completion: remove 'help' duplicate from porcelain commands
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
SZEDER Gábor authored and Junio C Hamano committed Nov 14, 2012
1 parent 8c7a786 commit 585b96b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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;;
Expand Down

0 comments on commit 585b96b

Please sign in to comment.