Merge branch 'tp/send-email-from-config'
[gitweb.git] / git-mergetool.sh
index efa31a228ebbb07259132e2702b91e6623e1db5f..b52a7410bcb7b37dce0f4d6213dddedd2c1e42e7 100755 (executable)
@@ -174,9 +174,11 @@ merge_file () {
        read ans
     fi
 
-    present=false
-    base_present &&
-    present=true
+    if base_present; then
+           present=true
+    else
+           present=false
+    fi
 
     if ! run_merge_tool "$merge_tool" "$present"; then
        echo "merge of $MERGED failed" 1>&2
@@ -254,12 +256,11 @@ prompt_after_failed_merge() {
     done
 }
 
-merge_tool=$(get_merge_tool "$merge_tool") || exit
-merge_tool_cmd="$(get_merge_tool_cmd "$merge_tool")"
-merge_tool_path="$(get_merge_tool_path "$merge_tool")" || exit
-merge_keep_backup="$(git config --bool merge.keepBackup || echo true)"
+if test -z "$merge_tool"; then
+    merge_tool=$(get_merge_tool "$merge_tool") || exit
+fi
+merge_keep_backup="$(git config --bool mergetool.keepBackup || echo true)"
 merge_keep_temporaries="$(git config --bool mergetool.keepTemporaries || echo false)"
-merge_tool_trust_exit_code="$(git config --bool mergetool."$merge_tool".trustExitCode || echo false)"
 
 last_status=0
 rollup_status=0