From: Jonathan Nieder Date: Sat, 14 Nov 2009 19:33:00 GMT Subject: Re: [PATCH] Speed up bash completion loading Message-ID: <20091114193300.GA1856@progeny.tock> In-Reply-To: <20091114144303.GA31540@neumann> Hi Gábor, SZEDER Gábor wrote: > Why? Don't get overly creative here, the command > > . /path/to/git-completion.bash > > already does that, plus it fixes the merge strategy completion issue, > and it's friendly enough for the users. Sounds like a good approach. Squashing this in should get that working again. Signed-off-by: Jonathan Nieder --- In this patch, I assume the merge strategy list is not being cached any more. Something like this would allow recovering from the merge strategy completion issue, but the victim would have to notice what went wrong first. contrib/completion/git-completion.bash | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 634941f..ae39373 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -495,6 +495,7 @@ __git_list_all_commands () done } +unset __git_all_commands __git_compute_all_commands () { : ${__git_all_commands=$(__git_list_all_commands)} @@ -586,6 +587,7 @@ __git_list_porcelain_commands () done } +unset __git_porcelain_commands __git_compute_porcelain_commands () { __git_compute_all_commands -- 1.6.5.2