Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

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

From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:45:11

On 8/19/08, Johannes Sixt [off-list ref] wrote:
Nguyen Thai Ngoc Duy schrieb:
quoted
+--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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help