aboutsummaryrefslogtreecommitdiffstats
path: root/git-mergetool--lib.sh
diff options
context:
space:
mode:
authorCharles Bailey <charles@hashpling.org>2010-08-20 16:25:09 +0100
committerJunio C Hamano <gitster@pobox.com>2010-08-20 14:09:04 -0700
commitaf3147147f39274bd0d47faca196f84c4e9ec68d (patch)
tree020b1f727a6786ce01dfeacf5c86e83acabc4f5d /git-mergetool--lib.sh
parent64fdc08dac6694d1e754580e7acb82dfa4988bb9 (diff)
downloadgit-af3147147f39274bd0d47faca196f84c4e9ec68d.tar.gz
mergetool: Remove explicit references to /dev/tty
mergetool used /dev/tty to switch back to receiving input from the user via inside a block with a redirected stdin. This harms testability, so change mergetool to save its original stdin to an alternative fd in this block and restore it for those sub-commands that need the original stdin. Includes additional compatibility fix from Jonathan Nieder. Tested-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Charles Bailey <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-mergetool--lib.sh')
-rw-r--r--git-mergetool--lib.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index 51dd0d67ba..b5e1943b1d 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -35,7 +35,7 @@ check_unchanged () {
while true; do
echo "$MERGED seems unchanged."
printf "Was the merge successful? [y/n] "
- read answer < /dev/tty
+ read answer
case "$answer" in
y*|Y*) status=0; break ;;
n*|N*) status=1; break ;;