From e622f41dcd97861796c7529712170f9eae07dc56 Mon Sep 17 00:00:00 2001 From: Jay Soffian Date: Mon, 19 Sep 2011 19:40:52 -0400 Subject: [PATCH] git-mergetool: check return value from read Mostly fixed already by 6b44577 (mergetool: check return value from read, 2011-07-01). Catch two uses it missed. Signed-off-by: Jay Soffian Signed-off-by: Junio C Hamano --- git-mergetool--lib.sh | 2 +- git-mergetool.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh index 4db921233..a79a2ecd4 100644 --- a/git-mergetool--lib.sh +++ b/git-mergetool--lib.sh @@ -38,7 +38,7 @@ check_unchanged () { while true; do echo "$MERGED seems unchanged." printf "Was the merge successful? [y/n] " - read answer + read answer || return 1 case "$answer" in y*|Y*) status=0; break ;; n*|N*) status=1; break ;; diff --git a/git-mergetool.sh b/git-mergetool.sh index 3c157bcd2..b6d463f0d 100755 --- a/git-mergetool.sh +++ b/git-mergetool.sh @@ -72,7 +72,7 @@ describe_file () { resolve_symlink_merge () { while true; do printf "Use (l)ocal or (r)emote, or (a)bort? " - read ans + read ans || return 1 case "$ans" in [lL]*) git checkout-index -f --stage=2 -- "$MERGED" -- 2.30.2