# [PATCH] Let merge set the default strategy.

2 messages from 2006-03-15 to 2006-03-15. Participants: Mark Hollomon, Junio C Hamano.
Thread: https://gitlist.dev/t/3653

## Mark Hollomon, 2006-03-15 22:51

Subject: [PATCH] Let merge set the default strategy.
Message-ID: <1142463103-6986-markhollomon@comcast.net>
URL: https://gitlist.dev/e/1142463103-6986-markhollomon%40comcast.net

```
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
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, 2006-03-15 23:40

Subject: Re: [PATCH] Let merge set the default strategy.
Message-ID: <7vhd5zff9i.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vhd5zff9i.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <1142463103-6986-markhollomon@comcast.net>

```
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???

```
