delete_refs(): new function for the refs API
[gitweb.git] / git-mergetool.sh
index ff050e58ff3b752113105ba3ea5e20c6b633aae9..9f77e3a8bb0b1197f860912b6d0e56b40b607cb9 100755 (executable)
@@ -426,8 +426,6 @@ fi
 merge_keep_backup="$(git config --bool mergetool.keepBackup || echo true)"
 merge_keep_temporaries="$(git config --bool mergetool.keepTemporaries || echo false)"
 
-last_status=0
-rollup_status=0
 files=
 
 if test $# -eq 0
@@ -453,21 +451,15 @@ fi
 printf "Merging:\n"
 printf "%s\n" "$files"
 
-IFS='
-'
+rc=0
 for i in $files
 do
-       if test $last_status -ne 0
-       then
-               prompt_after_failed_merge || exit 1
-       fi
        printf "\n"
-       merge_file "$i"
-       last_status=$?
-       if test $last_status -ne 0
+       if ! merge_file "$i"
        then
-               rollup_status=1
+               rc=1
+               prompt_after_failed_merge || exit 1
        fi
 done
 
-exit $rollup_status
+exit $rc