Merge branch 'jc/doc-commit-only'
[gitweb.git] / git-difftool--helper.sh
index 7ef36b9482ccc4111f2c888bf5ccbaa2421a5875..d4fb6dfe138fffd4d000c7d5aeb7787bea9970f4 100755 (executable)
@@ -49,7 +49,8 @@ launch_merge_tool () {
                else
                        printf "Launch '%s' [Y/n]: " "$merge_tool"
                fi
-               if read ans && test "$ans" = n
+               read ans || return
+               if test "$ans" = n
                then
                        return
                fi
@@ -84,6 +85,12 @@ else
        while test $# -gt 6
        do
                launch_merge_tool "$1" "$2" "$5"
+               status=$?
+               if test "$status" != 0 &&
+                       test "$GIT_DIFFTOOL_TRUST_EXIT_CODE" = true
+               then
+                       exit $status
+               fi
                shift 7
        done
 fi