mergetool: Remove explicit references to /dev/tty
commitaf3147147f39274bd0d47faca196f84c4e9ec68d
authorCharles Bailey <charles@hashpling.org>
Fri, 20 Aug 2010 15:25:09 +0000 (20 16:25 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Aug 2010 21:09:04 +0000 (20 14:09 -0700)
tree020b1f727a6786ce01dfeacf5c86e83acabc4f5d
parent64fdc08dac6694d1e754580e7acb82dfa4988bb9
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>
git-mergetool--lib.sh
git-mergetool.sh