From: David Turner Date: Fri, 24 Jul 2015 04:45:23 GMT Subject: [PATCH 3/9] bisect: do not use update-ref for BISECT_HEAD Message-ID: <1437713129-19373-4-git-send-email-dturner@twopensource.com> In-Reply-To: <1437713129-19373-1-git-send-email-dturner@twopensource.com> Because BISECT_HEAD is a pseudoref, we shouldn't use update-ref to update it. Instead, we simply write to and delete the file. Signed-off-by: David Turner --- git-bisect.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index ea63223..8263555 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -181,7 +181,7 @@ bisect_start() { # echo "$start_head" >"$GIT_DIR/BISECT_START" && { test "z$mode" != "z--no-checkout" || - git update-ref --no-deref BISECT_HEAD "$start_head" + git rev-parse "$start_head" > "$GIT_DIR/BISECT_HEAD" } && git rev-parse --sq-quote "$@" >"$GIT_DIR/BISECT_NAMES" && eval "$eval true" && @@ -425,7 +425,7 @@ bisect_clean_state() { rm -f "$GIT_DIR/BISECT_TERMS" && # Cleanup head-name if it got left by an old version of git-bisect rm -f "$GIT_DIR/head-name" && - git update-ref -d --no-deref BISECT_HEAD && + rm -f "$GIT_DIR/BISECT_HEAD" && # clean up BISECT_START last rm -f "$GIT_DIR/BISECT_START" } -- 2.0.4.315.gad8727a-twtrsrc