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>
This commit is contained in:

committed by
Junio C Hamano

parent
8794bb5159
commit
c69b75b7d9
@ -13,7 +13,6 @@ static GIT_PATH_FUNC(git_path_bisect_terms, "BISECT_TERMS")
|
||||
static GIT_PATH_FUNC(git_path_bisect_expected_rev, "BISECT_EXPECTED_REV")
|
||||
static GIT_PATH_FUNC(git_path_bisect_ancestors_ok, "BISECT_ANCESTORS_OK")
|
||||
static GIT_PATH_FUNC(git_path_bisect_start, "BISECT_START")
|
||||
static GIT_PATH_FUNC(git_path_bisect_head, "BISECT_HEAD")
|
||||
static GIT_PATH_FUNC(git_path_bisect_log, "BISECT_LOG")
|
||||
static GIT_PATH_FUNC(git_path_head_name, "head-name")
|
||||
static GIT_PATH_FUNC(git_path_bisect_names, "BISECT_NAMES")
|
||||
@ -164,7 +163,7 @@ static int bisect_reset(const char *commit)
|
||||
strbuf_addstr(&branch, commit);
|
||||
}
|
||||
|
||||
if (!file_exists(git_path_bisect_head())) {
|
||||
if (!ref_exists("BISECT_HEAD")) {
|
||||
struct argv_array argv = ARGV_ARRAY_INIT;
|
||||
|
||||
argv_array_pushl(&argv, "checkout", branch.buf, "--", NULL);
|
||||
|
Reference in New Issue
Block a user