Cache the list of merge strategies and available commands during load.
authorShawn O. Pearce <spearce@spearce.org>
Mon, 27 Nov 2006 20:11:52 +0000 (15:11 -0500)
committerJunio C Hamano <junkio@cox.net>
Mon, 27 Nov 2006 20:57:21 +0000 (12:57 -0800)
commitb51ec6bddb572def384a21a18d5919a488e06ffb
treee963d4f18547b4115ff73825499220611e1e43ab
parentce1e39d29ee373786ceda9e79d0906a6451ab5a5
Cache the list of merge strategies and available commands during load.

Since the user's git installation is not likely to grow a new command
or merge strategy in the lifespan of the current shell process we can
save time during completion operations by caching these lists during
sourcing of the completion support.

If the git executable is not available or we run into errors while
caching at load time then we defer these to runtime and generate
the list on the fly.  This might happen if the user doesn't put git
into their PATH until after the completion script gets sourced.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
contrib/completion/git-completion.bash