t5702: use test_commit_bulk
[gitweb.git] / git-mergetool.sh
index 01b9ad59b24ff77221d5db4118c9d0265dc25fad..88fa6a914a172877991ae9890cae1a42ca51fb89 100755 (executable)
@@ -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