mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Make Commit.Parents a getter for an unexported parents field
This is exactly the same as what we did for Hash earlier. And for the same reason: we want to turn the parents field into a slice of pointers.
This commit is contained in:
parent
e27bc15bbd
commit
0f1f455edb
4 changed files with 13 additions and 9 deletions
|
@ -576,7 +576,7 @@ func generateCommits(count int) []*models.Commit {
|
|||
// I need to pick a random number of parents to add
|
||||
parentCount := rnd.Intn(2) + 1
|
||||
|
||||
parentHashes := currentCommit.Parents
|
||||
parentHashes := currentCommit.Parents()
|
||||
for j := 0; j < parentCount; j++ {
|
||||
reuseParent := rnd.Intn(6) != 1 && j <= len(pool)-1 && j != 0
|
||||
var newParent *models.Commit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue