From: Jonathan Nieder Date: Thu, 02 Dec 2010 06:38:51 GMT Subject: Re: [PATCH] Abort mergetool on read error from stdinput Message-ID: <20101202063851.GA1407@burratino> In-Reply-To: <1291271301-12511-1-git-send-email-robin.rosenberg@dewire.com> Hi Robin, Robin Rosenberg wrote: > infinite loop that is somewhat tricky to stop. Abort the script > if bash read fails. > > Signed-off-by: Robin Rosenberg That motivates half the change. > --- 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 > + read answer < /dev/tty || exit 1 Why not read answer || exit 1 so tests can still run without blocking? Aside from that, this looks like a good change; thanks. What platform are you on? ^C kills the entire process group here.