From: Junio C Hamano Date: Tue, 20 Sep 2011 03:46:48 +0000 (-0700) Subject: Merge branch 'maint' X-Git-Tag: v1.7.7-rc3~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5ec8217eb6c89974fda94808a310aa651577b25d;p=git.git Merge branch 'maint' * maint: git-mergetool: check return value from read --- 5ec8217eb6c89974fda94808a310aa651577b25d diff --cc git-mergetool--lib.sh index 8fc65d040,a79a2ecd4..ed630b208 --- a/git-mergetool--lib.sh +++ b/git-mergetool--lib.sh @@@ -13,15 -32,13 +13,15 @@@ translate_merge_tool_path () } check_unchanged () { - if test "$MERGED" -nt "$BACKUP"; then + if test "$MERGED" -nt "$BACKUP" + then status=0 else - while true; do + 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 ;;