{"thread":{"id":"39209","subject":"[PATCH] completion: remove redundant __git_compute_all_commands() call","startedAt":"2015-05-01T15:48:56Z","lastAt":"2015-05-01T15:48:56Z","messageCount":1,"participants":["SZEDER Gábor"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"260347","messageId":"1430495336-8456-1-git-send-email-szeder@ira.uka.de","threadId":"39209","inReplyTo":null,"subject":"[PATCH] completion: remove redundant __git_compute_all_commands() call","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2015-05-01T15:48:56Z","receivedAt":"2015-05-01T15:48:56Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"During lazy-initialization of the lists of all commands and porcelain\ncommands the function __git_compute_all_commands() is called twice.  The\nrelevant part of the call sequence looks like this:\n\n  __git_compute_porcelain_commands()\n     __git_compute_all_commands()\n        <finds list of all commands uninitialized>\n        __git_list_all_commands()\n        <initializes list of all commands>\n     __git_list_porcelain_commands()\n        __git_compute_all_commands()\n           <finds list of all commands already initialized, does nothing>\n        <filters porcelains from list of all commands>\n\nEither one of the two calls could be removed and the initialization of\nboth command lists would still work as a whole, but let's remove the call\nfrom __git_compute_porcelain_commands(), because this way\n__git_list_porcelain_commands() will keep working in itself.\n\nSigned-off-by: SZEDER Gábor <szeder@ira.uka.de>\n---\n contrib/completion/git-completion.bash | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 5944c82..8b0d2b4 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -735,7 +735,6 @@ __git_list_porcelain_commands ()\n __git_porcelain_commands=\n __git_compute_porcelain_commands ()\n {\n-\t__git_compute_all_commands\n \ttest -n \"$__git_porcelain_commands\" ||\n \t__git_porcelain_commands=$(__git_list_porcelain_commands)\n }\n-- \n1.9.5.msysgit.0\n"}]}