Re: [PATCH] bash-completion: fix getting strategy list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/19/08, Johannes Sixt <j.sixt@xxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux