summaryrefslogtreecommitdiff
path: root/git-am.sh
diff options
context:
space:
mode:
authorLibravatar Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>2015-06-04 17:04:55 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-06-04 10:42:41 -0700
commitd96a275b91bae1800cd43be0651e886e7e042a17 (patch)
tree8b59f9edfb9cef63cfb9288a8a3fc617aee6ecb3 /git-am.sh
parentt4150-am: refactor am -3 tests (diff)
downloadtgif-d96a275b91bae1800cd43be0651e886e7e042a17.tar.xz
git-am: add am.threeWay config variable
Add the am.threeWay configuration variable to use the -3 or --3way option of git am by default. When am.threeway is set and not desired for a specific git am command, the --no-3way option can be used to override it. Signed-off-by: Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-am.sh')
-rwxr-xr-xgit-am.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/git-am.sh b/git-am.sh
index 4696998d4e..ab8479eb45 100755
--- 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