X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-bisect.sh;h=1ab2f187dcfd1ab9b81bbc3ebb3605601b4d29f0;hb=f0243f26f6d8403cd8e83c7d498c81e01a1f1735;hp=8dc77c991c0e8c5a618383052306f9ef1a018352;hpb=434d036fe4b8f1b7571eb912957590a483944b26;p=git.git diff --git a/git-bisect.sh b/git-bisect.sh index 8dc77c99..1ab2f187 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -38,7 +38,8 @@ bisect_start() { # Verify HEAD. If we were bisecting before this, reset to the # top-of-line master first! # - head=$(readlink $GIT_DIR/HEAD) || die "Bad HEAD - I need a symlink" + head=$(GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD) || + die "Bad HEAD - I need a symbolic ref" case "$head" in refs/heads/bisect*) git checkout master || exit @@ -46,7 +47,7 @@ bisect_start() { refs/heads/*) ;; *) - die "Bad HEAD - strange symlink" + die "Bad HEAD - strange symbolic ref" ;; esac @@ -135,7 +136,7 @@ bisect_next() { echo "$rev" > "$GIT_DIR/refs/heads/new-bisect" git checkout new-bisect || exit mv "$GIT_DIR/refs/heads/new-bisect" "$GIT_DIR/refs/heads/bisect" && - ln -sf refs/heads/bisect "$GIT_DIR/HEAD" + GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD refs/heads/bisect git-show-branch "$rev" }