File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ check_unchanged () {
35
35
while true ; do
36
36
echo " $MERGED seems unchanged."
37
37
printf " Was the merge successful? [y/n] "
38
- read answer < /dev/tty
38
+ read answer
39
39
case " $answer " in
40
40
y* |Y* ) status=0; break ;;
41
41
n* |N* ) status=1; break ;;
Original file line number Diff line number Diff line change @@ -289,17 +289,21 @@ if test $# -eq 0 ; then
289
289
echo " No files need merging"
290
290
exit 0
291
291
fi
292
+
293
+ # Save original stdin
294
+ exec 3< & 0
295
+
292
296
printf " Merging:\n"
293
297
printf " $files \n"
294
298
295
299
files_to_merge |
296
300
while IFS= read i
297
301
do
298
302
if test $last_status -ne 0; then
299
- prompt_after_failed_merge < /dev/tty || exit 1
303
+ prompt_after_failed_merge < & 3 || exit 1
300
304
fi
301
305
printf " \n"
302
- merge_file " $i " < /dev/tty > /dev/tty
306
+ merge_file " $i " < & 3
303
307
last_status=$?
304
308
if test $last_status -ne 0; then
305
309
rollup_status=1
You can’t perform that action at this time.
0 commit comments