mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Apply correct styling to root commit in graph
The root commit is special in that it has no parents. So we need to add a pipe that's headed for a commit that doesn't actually exist i.e. the mythical empty tree commit. We're using the actual hash of that pseudo-commit, but it's not being read anywhere.
This commit is contained in:
parent
c9136538b5
commit
5df27c61ed
2 changed files with 22 additions and 1 deletions
|
@ -509,6 +509,18 @@ func TestGetNextPipes(t *testing.T) {
|
|||
{fromPos: 1, toPos: 1, fromSha: "d", toSha: "e", kind: STARTS, style: style.FgDefault},
|
||||
},
|
||||
},
|
||||
{
|
||||
prevPipes: []*Pipe{
|
||||
{fromPos: 0, toPos: 0, fromSha: "a", toSha: "root", kind: TERMINATES, style: style.FgDefault},
|
||||
},
|
||||
commit: &models.Commit{
|
||||
Sha: "root",
|
||||
Parents: []string{},
|
||||
},
|
||||
expected: []*Pipe{
|
||||
{fromPos: 1, toPos: 1, fromSha: "root", toSha: models.EmptyTreeCommitHash, kind: STARTS, style: style.FgDefault},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue