diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-04-17 18:05:11 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-04-17 18:05:11 -0700 |
| commit | 9d8370d44547d69e0734e47bb1c38e7ccd3e5387 (patch) | |
| tree | 01064b081e8e6bc76487265cc349816197018824 /git-mergetool.sh | |
| parent | d47ee0a5653441ae727e22b8985c517132c42d4c (diff) | |
| parent | 42943b950e12f2d3e56688ecef1b0502e162b436 (diff) | |
| download | git-9d8370d44547d69e0734e47bb1c38e7ccd3e5387.tar.xz | |
Merge branch 'tk/mergetool-gui-default-config'
"git mergetool" and "git difftool" learns a new configuration
guiDefault to optionally favor configured guitool over non-gui-tool
automatically when $DISPLAY is set.
* tk/mergetool-gui-default-config:
mergetool: new config guiDefault supports auto-toggling gui by DISPLAY
Diffstat (limited to 'git-mergetool.sh')
| -rwxr-xr-x | git-mergetool.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/git-mergetool.sh b/git-mergetool.sh index f751d9cfe2..8a922893f7 100755 --- a/git-mergetool.sh +++ b/git-mergetool.sh @@ -451,7 +451,7 @@ print_noop_and_exit () { main () { prompt=$(git config --bool mergetool.prompt) - GIT_MERGETOOL_GUI=false + GIT_MERGETOOL_GUI= guessed_merge_tool=false orderfile= @@ -511,9 +511,14 @@ main () { if test -z "$merge_tool" then - if ! merge_tool=$(get_merge_tool) + merge_tool=$(get_merge_tool) + subshell_exit_status=$? + if test $subshell_exit_status = 1 then guessed_merge_tool=true + elif test $subshell_exit_status -gt 1 + then + exit $subshell_exit_status fi fi merge_keep_backup="$(git config --bool mergetool.keepBackup || echo true)" |
