summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6fe9c57)
raw | patch | inline | side by side (parent: 6fe9c57)
author | Junio C Hamano <junkio@cox.net> | |
Fri, 6 Apr 2007 05:51:14 +0000 (22:51 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 6 Apr 2007 05:51:14 +0000 (22:51 -0700) |
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>
instead of looking into $GIT_DIR/refs files directly.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-bisect.sh | patch | blob | history |
diff --git a/git-bisect.sh b/git-bisect.sh
index 2e68e3dac0743ca3d7d8d3bd281adcbdaa904f72..c936533883a20f6d4f9879f56c750e4b37383a92 100755 (executable)
--- a/git-bisect.sh
+++ b/git-bisect.sh
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)