path: root/
diff options
authorCharles Bailey <>2010-08-20 15:25:09 (GMT)
committerJunio C Hamano <>2010-08-20 21:09:04 (GMT)
commitaf3147147f39274bd0d47faca196f84c4e9ec68d (patch)
tree020b1f727a6786ce01dfeacf5c86e83acabc4f5d /
parent64fdc08dac6694d1e754580e7acb82dfa4988bb9 (diff)
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 <> Signed-off-by: Charles Bailey <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to '')
1 files changed, 1 insertions, 1 deletions
diff --git a/ b/
index 51dd0d6..b5e1943 100644
--- a/
+++ b/
@@ -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 ;;