1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-10-19 08:09:21 +03:00

fix bug for combining directories with single child

This commit is contained in:
Jesse Duffield
2021-03-14 20:23:06 +11:00
parent a31db3df9c
commit def68ddc8f
2 changed files with 30 additions and 8 deletions

View File

@@ -64,6 +64,23 @@ func TestCompress(t *testing.T) {
},
},
},
{
Name: "dir3",
Path: "dir3",
Children: []*StatusLineNode{
{
Name: "dir3-1",
Path: "dir3/dir3-1",
Children: []*StatusLineNode{
{
File: &File{Name: "file5", ShortStatus: "M ", HasUnstagedChanges: true},
Name: "file5",
Path: "dir3/dir3-1/file5",
},
},
},
},
},
{
File: &File{Name: "file1", ShortStatus: "M ", HasUnstagedChanges: true},
Name: "file1",
@@ -95,6 +112,11 @@ func TestCompress(t *testing.T) {
},
},
},
{
Name: "dir3/dir3-1/file5",
File: &File{Name: "file5", ShortStatus: "M ", HasUnstagedChanges: true},
Path: "dir3/dir3-1/file5",
},
{
File: &File{Name: "file1", ShortStatus: "M ", HasUnstagedChanges: true},
Name: "file1",