summaryrefslogtreecommitdiff
path: root/git-mergetool.sh
diff options
context:
space:
mode:
authorLibravatar Jiang Xin <worldhello.net@gmail.com>2019-05-31 14:34:26 +0800
committerLibravatar Jiang Xin <worldhello.net@gmail.com>2019-05-31 14:34:26 +0800
commita17177ce3ac74afc0b2e6fc6c80c1e1991b96a13 (patch)
tree0ff1a62d28a13bc8d8708148b85d3b0ba2632f92 /git-mergetool.sh
parentMerge branch 'master' of https://github.com/Softcatala/git-po (diff)
parentGit 2.22-rc2 (diff)
downloadtgif-a17177ce3ac74afc0b2e6fc6c80c1e1991b96a13.tar.xz
Merge branch 'master' of git://git.kernel.org/pub/scm/git/git
* 'master' of git://git.kernel.org/pub/scm/git/git: (66 commits) Git 2.22-rc2 ...
Diffstat (limited to 'git-mergetool.sh')
-rwxr-xr-xgit-mergetool.sh12
1 files changed, 4 insertions, 8 deletions
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 01b9ad59b2..88fa6a914a 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -389,7 +389,7 @@ print_noop_and_exit () {
main () {
prompt=$(git config --bool mergetool.prompt)
- gui_tool=false
+ GIT_MERGETOOL_GUI=false
guessed_merge_tool=false
orderfile=
@@ -416,10 +416,10 @@ main () {
esac
;;
--no-gui)
- gui_tool=false
+ GIT_MERGETOOL_GUI=false
;;
-g|--gui)
- gui_tool=true
+ GIT_MERGETOOL_GUI=true
;;
-y|--no-prompt)
prompt=false
@@ -449,12 +449,8 @@ main () {
if test -z "$merge_tool"
then
- # Check if a merge tool has been configured
- merge_tool=$(get_configured_merge_tool $gui_tool)
- # Try to guess an appropriate merge tool if no tool has been set.
- if test -z "$merge_tool"
+ if ! merge_tool=$(get_merge_tool)
then
- merge_tool=$(guess_merge_tool) || exit
guessed_merge_tool=true
fi
fi