git-bisect: modernization
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>
This commit is contained in:
parent
6fe9c570cc
commit
6fecf1915c
@ -169,11 +169,10 @@ bisect_write_good() {
|
|||||||
|
|
||||||
bisect_next_check() {
|
bisect_next_check() {
|
||||||
next_ok=no
|
next_ok=no
|
||||||
test -f "$GIT_DIR/refs/bisect/bad" &&
|
git show-ref -q --verify refs/bisect/bad &&
|
||||||
case "$(cd "$GIT_DIR" && echo refs/bisect/good-*)" in
|
test -n "$(git for-each-ref "refs/bisect/good-*")" &&
|
||||||
refs/bisect/good-\*) ;;
|
next_ok=yes
|
||||||
*) next_ok=yes ;;
|
|
||||||
esac
|
|
||||||
case "$next_ok,$1" in
|
case "$next_ok,$1" in
|
||||||
no,) false ;;
|
no,) false ;;
|
||||||
no,fail)
|
no,fail)
|
||||||
|
Loading…
Reference in New Issue
Block a user