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 <>

> > > Does the git completion script returns any duplicates at all?
> > 
> > It does.  'help' is returned twice for example.
> Right.  Now that you mentioned it, I remember I noticed it a while
> ago, too.  I even wrote a patch to fix it, but not sure what became of
> it.  Will try to dig it up.

Here it is.  It turns out I wrote it in May this year, but according to
gmane and my mailbox never sent it out.

 contrib/completion/git-completion.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/completion/git-completion.bash 
index bc0657a2..b7b1a834 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -585,7 +585,7 @@ __git_list_porcelain_commands ()
        local i IFS=" "$'\n'
-       for i in "help" $__git_all_commands
+       for i in $__git_all_commands
                case $i in
                *--*)             : helper pattern;;
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to