Code

Let merge set the default strategy.
authorMark Hollomon <markhollomon@comcast.net>
Wed, 15 Mar 2006 22:51:41 +0000 (22:51 +0000)
committerJunio C Hamano <junkio@cox.net>
Thu, 16 Mar 2006 00:14:33 +0000 (16:14 -0800)
If the user does not set a merge strategy for git-pull,
let git-merge calculate a default strategy.

[jc: with minor stylistic tweaks]

Signed-off-by: Mark Hollomon <markhollomon@comcast.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-pull.sh

index 6caf1aad471bbf8f894ea20a80c3be082012648b..17fda26721b7203faffd68bd178d5b757252d4d8 100755 (executable)
@@ -71,19 +71,15 @@ case "$merge_head" in
        ;;
 ?*' '?*)
        var=`git repo-config --get pull.octopus`
-       if test '' = "$var"
+       if test -n "$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 -n "$var"
+        then
                strategy_default_args="-s $var"
        fi
        ;;