Merge branch 'sb/strbuf-h-update' into maint
[gitweb.git] / git-mergetool.sh
index c062e3de3a503bd01203f2a6aef63eea63cae5c5..d07c7f387cf478bbd93d1dada1afa1de80db0fbf 100755 (executable)
@@ -491,14 +491,16 @@ main () {
        printf "%s\n" "$files"
 
        rc=0
-       for i in $files
+       set -- $files
+       while test $# -ne 0
        do
                printf "\n"
-               if ! merge_file "$i"
+               if ! merge_file "$1"
                then
                        rc=1
-                       prompt_after_failed_merge || exit 1
+                       test $# -ne 1 && prompt_after_failed_merge || exit 1
                fi
+               shift
        done
 
        exit $rc