git-am: add am.threeWay config variable
[gitweb.git] / git-am.sh
index 4696998d4e4bd8f2355008cd35cf85600521d60b..ab8479eb45a692855a04c2fffb81bac2b2f8e60d 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -390,6 +390,11 @@ then
     keepcr=t
 fi
 
+if test "$(git config --bool --get am.threeWay)" = true
+then
+    threeway=t
+fi
+
 while test $# != 0
 do
        case "$1" in
@@ -401,6 +406,8 @@ it will be removed. Please do not use it anymore."
                ;;
        -3|--3way)
                threeway=t ;;
+       --no-3way)
+               threeway=f ;;
        -s|--signoff)
                sign=t ;;
        -u|--utf8)
@@ -658,6 +665,8 @@ fi
 if test "$(cat "$dotest/threeway")" = t
 then
        threeway=t
+else
+       threeway=f
 fi
 git_apply_opt=$(cat "$dotest/apply-opt")
 if test "$(cat "$dotest/sign")" = t