summaryrefslogtreecommitdiff
path: root/git-mergetool.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-09-16 13:19:33 -0700
committerJunio C Hamano <gitster@pobox.com>2011-09-26 09:39:45 -0700
commit6d9990a959c0168ab6dfe75236980f95ac512ce5 (patch)
treec57a65f019c9104414afeaffa6af931f4a20b951 /git-mergetool.sh
parent3e8e691abe4e1cce73a8a2ef413dada0278e7b3b (diff)
downloadgit-6d9990a959c0168ab6dfe75236980f95ac512ce5.tar.gz
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>
Diffstat (limited to 'git-mergetool.sh')
-rwxr-xr-xgit-mergetool.sh10
1 files changed, 4 insertions, 6 deletions
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 83551c70c7..0a06bde843 100755
--- a/git-mergetool.sh
+++ b/git-mergetool.sh
@@ -362,20 +362,18 @@ if test -z "$files" ; then
exit 0
fi
-# Save original stdin
-exec 3<&0
-
printf "Merging:\n"
printf "$files\n"
IFS='
-'; for i in $files
+'
+for i in $files
do
if test $last_status -ne 0; then
- prompt_after_failed_merge <&3 || exit 1
+ prompt_after_failed_merge || exit 1
fi
printf "\n"
- merge_file "$i" <&3
+ merge_file "$i"
last_status=$?
if test $last_status -ne 0; then
rollup_status=1