From: SZEDER Gábor Date: Fri, 1 May 2015 15:48:56 +0000 (+0200) Subject: completion: remove redundant __git_compute_all_commands() call X-Git-Tag: v2.5.0-rc0~124^2 X-Git-Url: http://git.bitbasher.net/?a=commitdiff_plain;h=110062a134450f402f6d2e3e78a5aabb1df821fa;p=git.git 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() __git_list_all_commands() __git_list_porcelain_commands() __git_compute_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 Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 5944c824ab..8b0d2b4a3d 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -735,7 +735,6 @@ __git_list_porcelain_commands () __git_porcelain_commands= __git_compute_porcelain_commands () { - __git_compute_all_commands test -n "$__git_porcelain_commands" || __git_porcelain_commands=$(__git_list_porcelain_commands) }