From d96a275b91bae1800cd43be0651e886e7e042a17 Mon Sep 17 00:00:00 2001 From: Remi Lespinet Date: Thu, 4 Jun 2015 17:04:55 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- git-am.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'git-am.sh') 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 -- cgit v1.2.1