From 8055f5c1398eec61a5ab38b53d7af70240ff627a Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Fri, 30 Oct 2026 20:44:50 +0100 Subject: [PATCH] Show the log of HEAD until both a good and a bad commit are known Once a bisect had started, the commits view showed the log of the branch that was checked out when it started, even while git was still waiting for a good or a bad commit. If the user checked out a different branch to mark its head as bad, its commits weren't shown. Keep showing the log of HEAD until git starts checking out commits to test. Co-Authored-By: Claude Opus 5.5 --- pkg/gui/controllers/helpers/refresh_helper.go | 8 ++++++-- .../tests/bisect/check_out_branch_before_bisecting.go | 7 ------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/pkg/gui/controllers/helpers/refresh_helper.go b/pkg/gui/controllers/helpers/refresh_helper.go index 4a7aa6f0c..c367fd80b 100644 --- a/pkg/gui/controllers/helpers/refresh_helper.go +++ b/pkg/gui/controllers/helpers/refresh_helper.go @@ -1753,12 +1753,16 @@ func (self *RefreshHelper) refreshStatus(env refreshEnv) { func (self *RefreshHelper) refForLog(env refreshEnv) (string, *git_commands.BisectInfo) { bisectInfo := env.git.Bisect.GetInfo() - if !bisectInfo.Started() { + // Until we know both a good and a bad commit, git hasn't checked out + // anything for the user to test, and the user may be checking out + // branches to find the commits to mark. Show the log of what's checked + // out, as usual. + if !bisectInfo.Bisecting() { return "HEAD", bisectInfo } // need to see if our bisect's current commit is reachable from our 'new' ref. - if bisectInfo.Bisecting() && !env.git.Bisect.ReachableFromStart(bisectInfo) { + if !env.git.Bisect.ReachableFromStart(bisectInfo) { return bisectInfo.GetNewHash(), bisectInfo } diff --git a/pkg/integration/tests/bisect/check_out_branch_before_bisecting.go b/pkg/integration/tests/bisect/check_out_branch_before_bisecting.go index b9e7d2bbf..6acfc7feb 100644 --- a/pkg/integration/tests/bisect/check_out_branch_before_bisecting.go +++ b/pkg/integration/tests/bisect/check_out_branch_before_bisecting.go @@ -43,7 +43,6 @@ var CheckOutBranchBeforeBisecting = NewIntegrationTest(NewIntegrationTestArgs{ ) t.Views().Commits(). - /* EXPECTED: Lines( Contains("CI commit-06"), Contains("CI commit-05"), @@ -52,11 +51,5 @@ var CheckOutBranchBeforeBisecting = NewIntegrationTest(NewIntegrationTestArgs{ Contains("CI commit-02"), Contains("CI commit-01"), ) - ACTUAL: */ - Lines( - Contains("CI commit-03").Contains("<-- good"), - Contains("CI commit-02"), - Contains("CI commit-01"), - ) }, })