diff options
Diffstat (limited to 'git-difftool--helper.sh')
-rwxr-xr-x | git-difftool--helper.sh | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/git-difftool--helper.sh b/git-difftool--helper.sh index 8452890be9..3d0fe0cd93 100755 --- a/git-difftool--helper.sh +++ b/git-difftool--helper.sh @@ -43,12 +43,15 @@ launch_merge_tool () { printf "\nViewing: '$MERGED'\n" if use_ext_cmd then - printf "Hit return to launch '%s': " \ + printf "Launch '%s' [Y/n]: " \ "$GIT_DIFFTOOL_EXTCMD" else - printf "Hit return to launch '%s': " "$merge_tool" + printf "Launch '%s' [Y/n]: " "$merge_tool" + fi + if read ans && test "$ans" = n + then + return fi - read ans fi if use_ext_cmd @@ -70,9 +73,16 @@ then fi fi -# Launch the merge tool on each path provided by 'git diff' -while test $# -gt 6 -do - launch_merge_tool "$1" "$2" "$5" - shift 7 -done +if test -n "$GIT_DIFFTOOL_DIRDIFF" +then + LOCAL="$1" + REMOTE="$2" + run_merge_tool "$merge_tool" false +else + # Launch the merge tool on each path provided by 'git diff' + while test $# -gt 6 + do + launch_merge_tool "$1" "$2" "$5" + shift 7 + done +fi |