mirror of
https://github.com/git/git.git
synced 2024-11-28 04:23:30 +08:00
mergetool: no longer need to save standard input
Earlier code wanted to run merge_file and prompt_after_failed_merge both of which wanted to read from the standard input of the entire script inside a while loop, which read from a pipe, and in order to do so, it redirected the original standard input to another file descriptor. We no longer need to do so after the previous change. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
3e8e691abe
commit
6d9990a959
@ -362,20 +362,18 @@ if test -z "$files" ; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Save original stdin
|
|
||||||
exec 3<&0
|
|
||||||
|
|
||||||
printf "Merging:\n"
|
printf "Merging:\n"
|
||||||
printf "$files\n"
|
printf "$files\n"
|
||||||
|
|
||||||
IFS='
|
IFS='
|
||||||
'; for i in $files
|
'
|
||||||
|
for i in $files
|
||||||
do
|
do
|
||||||
if test $last_status -ne 0; then
|
if test $last_status -ne 0; then
|
||||||
prompt_after_failed_merge <&3 || exit 1
|
prompt_after_failed_merge || exit 1
|
||||||
fi
|
fi
|
||||||
printf "\n"
|
printf "\n"
|
||||||
merge_file "$i" <&3
|
merge_file "$i"
|
||||||
last_status=$?
|
last_status=$?
|
||||||
if test $last_status -ne 0; then
|
if test $last_status -ne 0; then
|
||||||
rollup_status=1
|
rollup_status=1
|
||||||
|
Loading…
Reference in New Issue
Block a user