summaryrefslogtreecommitdiff
path: root/git-bisect.sh
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2020-07-10 17:19:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-07-10 20:53:37 (GMT)
commitde966e39a8ba585e6cb0483c49e562c2f6eb3f77 (patch)
tree1ee638601747260cfd4c89213b63b5b152c9f617 /git-bisect.sh
parentce57d85645540fe59e8ec84929288361f1affae7 (diff)
downloadgit-de966e39a8ba585e6cb0483c49e562c2f6eb3f77.zip
git-de966e39a8ba585e6cb0483c49e562c2f6eb3f77.tar.gz
git-de966e39a8ba585e6cb0483c49e562c2f6eb3f77.tar.bz2
bisect: treat BISECT_HEAD as a pseudo ref
Both the git-bisect.sh as bisect--helper inspected the file system directly. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-bisect.sh')
-rwxr-xr-xgit-bisect.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index 08a6ed5..f03fbb1 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -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