mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-11-06 13:00:59 -04:00
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4725e80b34
commit
8055f5c139
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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"),
|
||||
)
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user