Skip to content

Commit

Permalink
git-bisect: modernization
Browse files Browse the repository at this point in the history
This slightly modernizes the bisect script to use show-ref/for-each-ref
instead of looking into $GIT_DIR/refs files directly.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Apr 6, 2007
1 parent 6fe9c57 commit 6fecf19
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions git-bisect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,10 @@ bisect_write_good() {

bisect_next_check() {
next_ok=no
test -f "$GIT_DIR/refs/bisect/bad" &&
case "$(cd "$GIT_DIR" && echo refs/bisect/good-*)" in
refs/bisect/good-\*) ;;
*) next_ok=yes ;;
esac
git show-ref -q --verify refs/bisect/bad &&
test -n "$(git for-each-ref "refs/bisect/good-*")" &&
next_ok=yes

case "$next_ok,$1" in
no,) false ;;
no,fail)
Expand Down

0 comments on commit 6fecf19

Please sign in to comment.