Skip to content

Commit e0d3363

Browse files
dschogitster
authored andcommitted
bisect: no longer try to clean up left-over .git/head-name files
As per the code comment, the `.git/head-name` files were cleaned up for backwards-compatibility: an old version of `git bisect` could have left them behind. Now, just how old would such a version be? As of 0f497e7 (Eliminate confusing "won't bisect on seeked tree" failure, 2008-02-23), `git bisect` does not write that file anymore. Which corresponds to Git v1.5.4.4. Even if the likelihood is non-nil that there might still be users out there who use such an old version to start a bisection, but then decide to continue bisecting with a current Git version, it is highly improbable. So let's remove that code, at long last. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cdba233 commit e0d3363

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

bisect.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,6 @@ static GIT_PATH_FUNC(git_path_bisect_start, "BISECT_START")
474474
static GIT_PATH_FUNC(git_path_bisect_log, "BISECT_LOG")
475475
static GIT_PATH_FUNC(git_path_bisect_terms, "BISECT_TERMS")
476476
static GIT_PATH_FUNC(git_path_bisect_first_parent, "BISECT_FIRST_PARENT")
477-
static GIT_PATH_FUNC(git_path_head_name, "head-name")
478477

479478
static void read_bisect_paths(struct strvec *array)
480479
{
@@ -1173,8 +1172,6 @@ int bisect_clean_state(void)
11731172
unlink_or_warn(git_path_bisect_run());
11741173
unlink_or_warn(git_path_bisect_terms());
11751174
unlink_or_warn(git_path_bisect_first_parent());
1176-
/* Cleanup head-name if it got left by an old version of git-bisect */
1177-
unlink_or_warn(git_path_head_name());
11781175
/*
11791176
* Cleanup BISECT_START last to support the --no-checkout option
11801177
* introduced in the commit 4796e823a.

t/t6030-bisect-porcelain.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,6 @@ test_expect_success 'git bisect reset cleans bisection state properly' '
990990
test_path_is_missing ".git/BISECT_LOG" &&
991991
test_path_is_missing ".git/BISECT_RUN" &&
992992
test_path_is_missing ".git/BISECT_TERMS" &&
993-
test_path_is_missing ".git/head-name" &&
994993
test_path_is_missing ".git/BISECT_HEAD" &&
995994
test_path_is_missing ".git/BISECT_START"
996995
'

0 commit comments

Comments
 (0)