提交 9b709e47 编写于 作者: P Petr Baudis 提交者: Junio C Hamano

bisect reset: Leave the tree in usable state if git-checkout failed

I had local modifications in the tree and doing bisect reset required me to
manually edit .git/HEAD.
Signed-off-by: NPetr Baudis <pasky@suse.cz>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 3453f862
......@@ -179,11 +179,12 @@ bisect_reset() {
*)
usage ;;
esac
git checkout "$branch" &&
rm -fr "$GIT_DIR/refs/bisect"
rm -f "$GIT_DIR/refs/heads/bisect" "$GIT_DIR/head-name"
rm -f "$GIT_DIR/BISECT_LOG"
rm -f "$GIT_DIR/BISECT_NAMES"
if git checkout "$branch"; then
rm -fr "$GIT_DIR/refs/bisect"
rm -f "$GIT_DIR/refs/heads/bisect" "$GIT_DIR/head-name"
rm -f "$GIT_DIR/BISECT_LOG"
rm -f "$GIT_DIR/BISECT_NAMES"
fi
}
bisect_replay () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册