mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-13 09:06:27 -04:00
Fix test by making branches appear deterministically
This fixes pkg/integration/tests/worktree/rebase.go which was failing on old git versions due to a difference in order of branches that don't have recency values
This commit is contained in:
parent
30cf274874
commit
180908d244
|
|
@ -81,6 +81,12 @@ outer:
|
|||
}
|
||||
}
|
||||
|
||||
// Sort branches that don't have a recency value alphabetically
|
||||
// (we're really doing this for the sake of deterministic behaviour across git versions)
|
||||
slices.SortFunc(branches, func(a *models.Branch, b *models.Branch) bool {
|
||||
return a.Name < b.Name
|
||||
})
|
||||
|
||||
branches = slices.Prepend(branches, branchesWithRecency...)
|
||||
|
||||
foundHead := false
|
||||
|
|
|
|||
Loading…
Reference in a new issue