Re: [PATCH] git-completion.bash: always swallow error output of for-each-ref
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 13, 2016, 09:21 UTC
- Message-ID
- <alpine.DEB.2.20.1602131021170.2964@virtualbox>
- In-Reply-To
- <20160213020712.Horde.SM-rQbc5Jx1UwdYxdvNFNJx@webmail.informatik.kit.edu>
Hi Gábor,
On Sat, 13 Feb 2016, SZEDER Gábor wrote:
Show 25 quoted lines
> $ cur=m ; time __gitcomp_nl "$(__git_refs '' 1)" > > real 0m7.641s > user 0m5.888s > sys 0m1.832s > > Using 'refname:strip=2' for both 'git for-each-ref' in __git_refs(): > > $ cur=m ; time __gitcomp_nl "$(__git_refs '' 1)" > > real 0m2.848s > user 0m2.308s > sys 0m0.596s > > Quick'n'dirty PoC using 'refname:strip', '**' globbing and a few more > tricks to let 'git for-each-ref' do the filtering instead of the > shell loop behind __gitcomp_nl(): > > $ cur=m ; time IFS=$'\n' COMPREPLY=( $(__git_refs_PoC '' 1) ) > > real 0m0.247s > user 0m0.208s > sys 0m0.032s > > Not bad for a Friday night, huh? :)
Nope, not bad at all. May I have that patch, please? ;-)
Ciao, Dscho