From ba059498790f543bf22d419d0bf85c05d55f77e9 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 31 Oct 2026 07:55:34 +0100 Subject: [PATCH] Show the mark of the last tested commit once a bisect is done Once git has nothing left to test, the commit that the user marked last stays the current commit. The commits view labels it "<-- current", although git doesn't want the user to test it any more. Show its mark instead, like for the other marked commits. Co-Authored-By: Claude Opus 5.5 --- pkg/gui/presentation/commits.go | 2 +- pkg/integration/tests/bisect/select_first_bad_commit.go | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/gui/presentation/commits.go b/pkg/gui/presentation/commits.go index 7be1d1241..d2036aa2e 100644 --- a/pkg/gui/presentation/commits.go +++ b/pkg/gui/presentation/commits.go @@ -357,7 +357,7 @@ func getBisectStatus(index int, commitHash string, bisectInfo *git_commands.Bise return BisectStatusNone } - if bisectInfo.GetCurrentHash() == commitHash { + if bisectInfo.HasCommitToTest() && bisectInfo.GetCurrentHash() == commitHash { return BisectStatusCurrent } diff --git a/pkg/integration/tests/bisect/select_first_bad_commit.go b/pkg/integration/tests/bisect/select_first_bad_commit.go index 2e83e1831..e108dd178 100644 --- a/pkg/integration/tests/bisect/select_first_bad_commit.go +++ b/pkg/integration/tests/bisect/select_first_bad_commit.go @@ -38,10 +38,7 @@ var SelectFirstBadCommit = NewIntegrationTest(NewIntegrationTestArgs{ Contains("CI commit-10"), Contains("CI commit-09"), Contains("CI commit-08").Contains("<-- bad").IsSelected(), - /* EXPECTED: Contains("CI commit-07").Contains("<-- good"), - ACTUAL: */ - Contains("CI commit-07").Contains("<-- current"), Contains("CI commit-06"), Contains("CI commit-05").Contains("<-- good"), )