Subject: Re: ks/precompute-completion

From: Stephen Boyd <[email-masked]>
Date: Thu, 12 Nov 2009 23:12:13 -0800

Jonathan Nieder wrote:
> Stephen Boyd wrote:
>> I'm confused. Shouldn't your distro take care of updating the
>> completion for you? And wouldn't update-git-completion be more
>> suited as part of a makefile if it was needed at all?
>
> The problem is that I have git commands the distro did not install in
> my $PATH.  For example, I currently have git-new-workdir in ~/bin, and
> once I bzr-fastexport works a little better, I will install git-bzr.
>
> Even without such commands, in many distributions the completion
> should not be one size fits all, since git-svn (for example) belongs
> to a different package

Ah ok. I think this proves even more that pregenerating the completion 
is a bad idea. With dynamic population we don't have these problems and 
it only takes 250ms more to load on a P3 700Mhz.

Maybe we should try and speedup 'git help -a' and 'git merge -s help' 
instead? Perhaps options for the command/porcelain lists and available 
strategies formatted for script consumption? I doubt it will be as fast 
as compiling, but every bit helps apparently.

Side Note: Running git merge -s help outside a git repository fails, so 
caching of the merge strategies isn't very effective.