fetch_pack(): update sought->nr to reflect number of unique entries
[gitweb.git] / git-difftool--helper.sh
index 8452890be974d30942f0acaa3f19282c1b8b25b2..3d0fe0cd93b393a5f376aa10505e927fbed37f8f 100755 (executable)
@@ -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