summaryrefslogtreecommitdiff
path: root/git-am.sh
diff options
context:
space:
mode:
authorRemi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>2015-06-04 15:04:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-06-04 17:42:41 (GMT)
commitd96a275b91bae1800cd43be0651e886e7e042a17 (patch)
tree8b59f9edfb9cef63cfb9288a8a3fc617aee6ecb3 /git-am.sh
parent8c8884ce97eed5ab27a8b6f9f54a6f3795eded19 (diff)
downloadgit-d96a275b91bae1800cd43be0651e886e7e042a17.zip
git-d96a275b91bae1800cd43be0651e886e7e042a17.tar.gz
git-d96a275b91bae1800cd43be0651e886e7e042a17.tar.bz2
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 4696998..ab8479e 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