Re: [PATCH] bash-completion: fix getting strategy list
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Aug 20, 2008, 16:58 UTC
- Message-ID
- <fcaeb9bf0808200958u65ad8fa3oa118b88e16c9c50c@mail.gmail.com>
- In-Reply-To
- <48AADDBB.1080203@viscovery.net>
On 8/19/08, Johannes Sixt <j.sixt@viscovery.net> wrote:
Show 9 quoted lines
> 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