Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-04-06 09:51:14 +0400
committerJunio C Hamano <junkio@cox.net>2007-04-06 09:51:14 +0400
commit6fecf1915c5fd0b14e2ca2ec9e1a6b620abfb5c2 (patch)
treeb3ff93eeac9b22afbde3dae1d6f379848d762620 /git-bisect.sh
parent6fe9c570ccd9f893d9a981cd8ea5f51dc21ceec8 (diff)
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>
Diffstat (limited to 'git-bisect.sh')
-rwxr-xr-xgit-bisect.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index 2e68e3dac0..c936533883 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -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)