threads / patch / 3653

patchLet merge set the default strategy.

Subject: [PATCH] Let merge set the default strategy.

## tl;dr

2 messages between Mar 15, 2006 and Mar 15, 2006. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Mark Hollomon· Mar 15, 2006, 22:51 UTC · lore

If the user does not set a merge strategy for git-pull, let git-merge calculate a default strategy.

This may be preferable to the earlier patch involving NO_PYTHON.

Signed-off-by: Mark Hollomon <markhollomon@comcast.net>
---
 git-pull.sh |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
54e2c920b8ad979bc75d25ae73300be6077f46a0
Show changes to git-pull.sh +3 −7
diff --git a/git-pull.sh b/git-pull.sh
index 6caf1aa..7764b70 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -71,19 +71,15 @@ case "$merge_head" in
 	;;
 ?*' '?*)
 	var=`git repo-config --get pull.octopus`
-	if test '' = "$var"
+	if test '' != "$var"
 	then
-		strategy_default_args='-s octopus'
-	else
 		strategy_default_args="-s $var"
 	fi
 	;;
 *)
 	var=`git repo-config --get pull.twohead`
-	if test '' = "$var"
-	then
-		strategy_default_args='-s recursive'
-	else
+	if test '' != "$var"
+        then
 		strategy_default_args="-s $var"
 	fi
 	;;
-- 
1.2.4.gea75
Junio C Hamano· Mar 15, 2006, 23:40 UTC · re: Mark Hollomon · lore

Re: [PATCH] Let merge set the default strategy.

Mark Hollomon <markhollomon@comcast.net> writes:
> If the user does not set a merge strategy for git-pull,
> let git-merge calculate a default strategy.
Makes lot of sense, thanks.
> This may be preferable to the earlier patch involving
> NO_PYTHON.
Which earlier patch???

← back to recent threads