Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Re: git completion is really slow for some git commands.



Hi Jörg,


On Mon, 2008-10-13 at 00:53 +0000, Jörg Sommer wrote:
> >  * this shell array is then passed to _multi_parts for path splitting of
> > each element. This is this operation that takes age. As soon as I change
> > the _multi_parts code to just call a naive compadd and return, the
> > completion is (almost) immediate, and seems to work fine.
> 
> Can you try this patch? It doesn't change anything if you didn't specify
> anything, i.e. git log -- <TAB> takes still very long. But it optimizes
> the case when you specify anything. Try git log -- some/thing<TAB>.

[snipped patch]

Yes, that works way faster for this case. Unfortunately it doesn't seem
to report the right results:

when I try:
git log c<TAB>
it show in the completion menu:
---- index file
cleopatragame.com
---- branch
cdn

While I do have a cdn branch, I also happen to have more than one
file/directory starting with a 'c' in the index (there is common, and
colosseumgame.com). It's exactly as it was giving only the first choice.

I looked to your patch, and tried it outside of the completion system
and it was working fine (ie returning only results starting with 'c'),
so I'm puzzled.

At least it is a magnitude more faster :-)
You are definitely on the right track.
Many thanks,
-- 
Brice Figureau <brice+zsh@xxxxxxxxxxxxxxxx>



Messages sorted by: Reverse Date, Date, Thread, Author