File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
pkg/gui/presentation/graph Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -565,6 +565,7 @@ func generateCommits(count int) []*models.Commit {
565
565
// I need to pick a random number of parents to add
566
566
parentCount := rnd .Intn (2 ) + 1
567
567
568
+ parentHashes := currentCommit .Parents
568
569
for j := 0 ; j < parentCount ; j ++ {
569
570
reuseParent := rnd .Intn (6 ) != 1 && j <= len (pool )- 1 && j != 0
570
571
var newParent * models.Commit
@@ -577,10 +578,15 @@ func generateCommits(count int) []*models.Commit {
577
578
}
578
579
pool = append (pool , newParent )
579
580
}
580
- currentCommit . Parents = append (currentCommit . Parents , newParent .Hash )
581
+ parentHashes = append (parentHashes , newParent .Hash )
581
582
}
582
583
583
- commits = append (commits , currentCommit )
584
+ changedCommit := & models.Commit {
585
+ Hash : currentCommit .Hash ,
586
+ AuthorName : currentCommit .AuthorName ,
587
+ Parents : parentHashes ,
588
+ }
589
+ commits = append (commits , changedCommit )
584
590
}
585
591
586
592
return commits
You can’t perform that action at this time.
0 commit comments