]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-bisect.sh
t6416, t6423: clarify some comments and fix some typos
[thirdparty/git.git] / git-bisect.sh
index 08a6ed57ddb115413013ce5cd4c9a786b1a2bef9..f03fbb18f00403b2786f5b4cb1b18e30b1e820b2 100755 (executable)
@@ -41,7 +41,7 @@ TERM_GOOD=good
 
 bisect_head()
 {
-       if test -f "$GIT_DIR/BISECT_HEAD"
+       if git rev-parse --verify -q BISECT_HEAD > /dev/null
        then
                echo BISECT_HEAD
        else
@@ -153,7 +153,7 @@ bisect_next() {
        git bisect--helper --bisect-next-check $TERM_GOOD $TERM_BAD $TERM_GOOD|| exit
 
        # Perform all bisection computation, display and checkout
-       git bisect--helper --next-all $(test -f "$GIT_DIR/BISECT_HEAD" && echo --no-checkout)
+       git bisect--helper --next-all $(git rev-parse --verify -q BISECT_HEAD > /dev/null && echo --no-checkout)
        res=$?
 
        # Check if we should exit because bisection is finished