From: Nguyen Thai Ngoc Duy Date: Wed, 20 Aug 2008 16:58:14 GMT Subject: Re: [PATCH] bash-completion: fix getting strategy list Message-ID: In-Reply-To: <48AADDBB.1080203@viscovery.net> On 8/19/08, Johannes Sixt wrote: > Nguyen Thai Ngoc Duy schrieb: > > > +--show-strategies:: > > + Show all available strategies. For internal use only. > > + > > > IMO, you don't need to declare this option as internal; offering it for > the public is fine... On second thought, I don't think the patch's worth it. The code in git-completion.bash is a hack and I replace it with another the hack. It won't work for custom merges and git-completion.bash will need to be synced manually anyway, so maybe this patch will do better: diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 158b912..2fed6ac 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -267,19 +267,8 @@ __git_remotes () __git_merge_strategies () { - if [ -n "$__git_merge_strategylist" ]; then - echo "$__git_merge_strategylist" - return - fi - sed -n "/^all_strategies='/{ - s/^all_strategies='// - s/'// - p - q - }" "$(git --exec-path)/git-merge" -} -__git_merge_strategylist= -__git_merge_strategylist="$(__git_merge_strategies 2>/dev/null)" + echo recursive octopus resolve ours subtree +} __git_complete_file () { -- Duy