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 <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
740a8fc224
commit
e622f41dcd
@ -38,7 +38,7 @@ check_unchanged () {
|
|||||||
while true; do
|
while true; do
|
||||||
echo "$MERGED seems unchanged."
|
echo "$MERGED seems unchanged."
|
||||||
printf "Was the merge successful? [y/n] "
|
printf "Was the merge successful? [y/n] "
|
||||||
read answer
|
read answer || return 1
|
||||||
case "$answer" in
|
case "$answer" in
|
||||||
y*|Y*) status=0; break ;;
|
y*|Y*) status=0; break ;;
|
||||||
n*|N*) status=1; break ;;
|
n*|N*) status=1; break ;;
|
||||||
|
@ -72,7 +72,7 @@ describe_file () {
|
|||||||
resolve_symlink_merge () {
|
resolve_symlink_merge () {
|
||||||
while true; do
|
while true; do
|
||||||
printf "Use (l)ocal or (r)emote, or (a)bort? "
|
printf "Use (l)ocal or (r)emote, or (a)bort? "
|
||||||
read ans
|
read ans || return 1
|
||||||
case "$ans" in
|
case "$ans" in
|
||||||
[lL]*)
|
[lL]*)
|
||||||
git checkout-index -f --stage=2 -- "$MERGED"
|
git checkout-index -f --stage=2 -- "$MERGED"
|
||||||
|
Reference in New Issue
Block a user