Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Tue, 12 Aug 2008 02:24:28 +0000 (19:24 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Aug 2008 02:24:28 +0000 (19:24 -0700)
* maint:
git-bisect: fix wrong usage of read(1)

1  2 
git-bisect.sh
diff --combined git-bisect.sh
index 3cac20db79e1e408a321b0e9d272501985a3c49b,6c6c3de54a890cc4ba9927c6e8159c862cb231c4..97ac600873ebd0dff6310071343403a41a867b8a
@@@ -149,7 -149,7 +149,7 @@@ bisect_start() 
        echo "$start_head" >"$GIT_DIR/BISECT_START" &&
        sq "$@" >"$GIT_DIR/BISECT_NAMES" &&
        eval "$eval" &&
 -      echo "git-bisect start$orig_args" >>"$GIT_DIR/BISECT_LOG" || exit
 +      echo "git bisect start$orig_args" >>"$GIT_DIR/BISECT_LOG" || exit
        #
        # Check if we can proceed to the next bisect state.
        #
@@@ -169,7 -169,7 +169,7 @@@ bisect_write() 
        esac
        git update-ref "refs/bisect/$tag" "$rev" || exit
        echo "# $state: $(git show-branch $rev)" >>"$GIT_DIR/BISECT_LOG"
 -      test -n "$nolog" || echo "git-bisect $state $rev" >>"$GIT_DIR/BISECT_LOG"
 +      test -n "$nolog" || echo "git bisect $state $rev" >>"$GIT_DIR/BISECT_LOG"
  }
  
  bisect_state() {
@@@ -220,7 -220,8 +220,8 @@@ bisect_next_check() 
                if test -t 0
                then
                        printf >&2 'Are you sure [Y/n]? '
-                       case "$(read yesno)" in [Nn]*) exit 1 ;; esac
+                       read yesno
+                       case "$yesno" in [Nn]*) exit 1 ;; esac
                fi
                : bisect without good...
                ;;
@@@ -426,13 -427,9 +427,13 @@@ bisect_clean_state() 
  bisect_replay () {
        test -r "$1" || die "cannot read $1 for replaying"
        bisect_reset
 -      while read bisect command rev
 +      while read git bisect command rev
        do
 -              test "$bisect" = "git-bisect" || continue
 +              test "$git $bisect" = "git bisect" -o "$git" = "git-bisect" || continue
 +              if test "$git" = "git-bisect"; then
 +                      rev="$command"
 +                      command="$bisect"
 +              fi
                case "$command" in
                start)
                        cmd="bisect_start $rev"