mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-11-21 04:46:29 +03:00
During a bisect, the commits panel shows the commits known to be bad at the top, the known good ones at the bottom, and the ones that the bisect hasn't ruled out yet between them. Pressing '>' now stops at the bottommost bad commit, then at the commit to test, and then at the topmost good commit. It doesn't stop at each commit marked good. The commits between two of them are all good, and they don't form a section of their own. During a bisect, it also doesn't stop at the beginnings of the other sections, such as the beginning of a branch. The commits panel doesn't color the commits by whether they are merged while bisecting, so these would look like arbitrary commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
48 lines
1.5 KiB
Go
48 lines
1.5 KiB
Go
package bisect
|
|
|
|
import (
|
|
"github.com/jesseduffield/lazygit/pkg/config"
|
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
|
)
|
|
|
|
var GotoBottom = NewIntegrationTest(NewIntegrationTestArgs{
|
|
Description: "Go to the bottom of the commits list in steps, stopping only at the bad commit, the current commit, and the first good commit",
|
|
ExtraCmdArgs: []string{},
|
|
Skip: false,
|
|
SetupRepo: func(shell *Shell) {
|
|
shell.
|
|
CreateNCommits(3).
|
|
NewBranch("mybranch").
|
|
CreateNCommitsStartingAt(7, 4).
|
|
StartBisect("HEAD~1", "HEAD~8")
|
|
},
|
|
SetupConfig: func(cfg *config.AppConfig) {
|
|
cfg.GetUserConfig().Git.Log.ShowGraph = "never"
|
|
},
|
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
|
t.Views().Commits().
|
|
Focus().
|
|
Lines(
|
|
Contains("CI commit-10"),
|
|
Contains("CI commit-09").Contains("<-- bad"),
|
|
Contains("CI commit-08"),
|
|
Contains("CI commit-07"),
|
|
Contains("CI commit-06"),
|
|
Contains("CI commit-05").Contains("<-- current").IsSelected(),
|
|
Contains("CI commit-04"),
|
|
Contains("CI commit-03"),
|
|
Contains("CI commit-02").Contains("<-- good"),
|
|
Contains("CI commit-01"),
|
|
).
|
|
Press(keys.Universal.GotoTop).
|
|
Press(keys.Universal.GotoBottom).
|
|
SelectedLine(Contains("CI commit-09")).
|
|
Press(keys.Universal.GotoBottom).
|
|
SelectedLine(Contains("CI commit-05")).
|
|
Press(keys.Universal.GotoBottom).
|
|
SelectedLine(Contains("CI commit-02")).
|
|
Press(keys.Universal.GotoBottom).
|
|
SelectedLine(Contains("CI commit-01"))
|
|
},
|
|
})
|