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

1  2 
git-mergetool--lib.sh

index 8fc65d0400545e30fd56f890e6b17052f54f857c,a79a2ecd49411f30517943108851243afa64de7b..ed630b208a80a36d729b5074a39bc53df0cabd59
@@@ -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 ;;