mergetool: simplify conditionals
Combine the $last_status checks into a single conditional. Replace $last_status and $rollup_status with a single variable. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
c41d3fedd8
commit
98a260220c
|
|
@ -426,8 +426,6 @@ fi
|
||||||
merge_keep_backup="$(git config --bool mergetool.keepBackup || echo true)"
|
merge_keep_backup="$(git config --bool mergetool.keepBackup || echo true)"
|
||||||
merge_keep_temporaries="$(git config --bool mergetool.keepTemporaries || echo false)"
|
merge_keep_temporaries="$(git config --bool mergetool.keepTemporaries || echo false)"
|
||||||
|
|
||||||
last_status=0
|
|
||||||
rollup_status=0
|
|
||||||
files=
|
files=
|
||||||
|
|
||||||
if test $# -eq 0
|
if test $# -eq 0
|
||||||
|
|
@ -455,19 +453,15 @@ printf "%s\n" "$files"
|
||||||
|
|
||||||
IFS='
|
IFS='
|
||||||
'
|
'
|
||||||
|
rc=0
|
||||||
for i in $files
|
for i in $files
|
||||||
do
|
do
|
||||||
if test $last_status -ne 0
|
|
||||||
then
|
|
||||||
prompt_after_failed_merge || exit 1
|
|
||||||
fi
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
merge_file "$i"
|
if ! merge_file "$i"
|
||||||
last_status=$?
|
|
||||||
if test $last_status -ne 0
|
|
||||||
then
|
then
|
||||||
rollup_status=1
|
rc=1
|
||||||
|
prompt_after_failed_merge || exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
exit $rollup_status
|
exit $rc
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue