Code

Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Tue, 20 Sep 2011 03:46:48 +0000 (20:46 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Sep 2011 03:46:48 +0000 (20:46 -0700)
* maint:
  git-mergetool: check return value from read

git-mergetool--lib.sh
git-mergetool.sh

index 8fc65d0400545e30fd56f890e6b17052f54f857c..ed630b208a80a36d729b5074a39bc53df0cabd59 100644 (file)
@@ -21,7 +21,7 @@ check_unchanged () {
                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 ;;
index 3c157bcd26232c758572bf908add44216cb8e2e7..b6d463f0d057361ab5909209d24fc8fd383a3dbb 100755 (executable)
@@ -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"