Skip to content

Commit 110062a

Browse files
szedergitster
authored andcommitted
completion: remove redundant __git_compute_all_commands() call
During lazy-initialization of the lists of all commands and porcelain commands the function __git_compute_all_commands() is called twice. The relevant part of the call sequence looks like this: __git_compute_porcelain_commands() __git_compute_all_commands() <finds list of all commands uninitialized> __git_list_all_commands() <initializes list of all commands> __git_list_porcelain_commands() __git_compute_all_commands() <finds list of all commands already initialized, does nothing> <filters porcelains from list of all commands> Either one of the two calls could be removed and the initialization of both command lists would still work as a whole, but let's remove the call from __git_compute_porcelain_commands(), because this way __git_list_porcelain_commands() will keep working in itself. Signed-off-by: SZEDER Gábor <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3d4a3ff commit 110062a

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,6 @@ __git_list_porcelain_commands ()
735735
__git_porcelain_commands=
736736
__git_compute_porcelain_commands ()
737737
{
738-
__git_compute_all_commands
739738
test -n "$__git_porcelain_commands" ||
740739
__git_porcelain_commands=$(__git_list_porcelain_commands)
741740
}

0 commit comments

Comments
 (0)