Skip to content

Commit

Permalink
git-mergetool: check return value from read
Browse files Browse the repository at this point in the history
Mostly fixed already by 6b44577 (mergetool: check return value
from read, 2011-07-01). Catch two uses it missed.

Signed-off-by: Jay Soffian <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
jaysoffian authored and gitster committed Sep 20, 2011
1 parent 740a8fc commit e622f41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion git-mergetool--lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;;
Expand Down
2 changes: 1 addition & 1 deletion git-mergetool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e622f41

Please sign in to comment.