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>
Junio C Hamano committed
Sep 16, 2011 at 13:19 UTC
6d9990a959c0168ab6dfe75236980f95ac512ce5
1 file changed
+4
-6
git-mergetool.sh
+4
-6
@@ -362,20 +362,18 @@ if test -z "$files" ; then
362
exit 0
363
fi
364
365
-# Save original stdin
366
-exec 3<&0
367
-
365
printf "Merging:\n"
366
printf "$files\n"
367
368
IFS='
372
-'; for i in $files
369
+'
370
+for i in $files
371
do
372
if test $last_status -ne 0; then
375
- prompt_after_failed_merge <&3 || exit 1
373
+ prompt_after_failed_merge || exit 1
374
fi
375
printf "\n"
378
- merge_file "$i" <&3
376
+ merge_file "$i"
377
last_status=$?
378
if test $last_status -ne 0; then
379
rollup_status=1