1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

support submodules

This commit is contained in:
Jesse Duffield
2020-09-28 08:21:53 +10:00
parent 72a31aed76
commit ca437a6504
5 changed files with 55 additions and 5 deletions

View File

@ -4,6 +4,7 @@ import (
"github.com/fatih/color"
"github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils"
)
func GetFileListDisplayStrings(files []*commands.File, diffName string) [][]string {
@ -53,5 +54,10 @@ func getFileDisplayStrings(f *commands.File, diffed bool) []string {
output := firstCharCl.Sprint(firstChar)
output += secondCharCl.Sprint(secondChar)
output += restColor.Sprintf(" %s", f.Name)
if f.IsSubmodule {
output += utils.ColoredString(" (submodule)", theme.DefaultTextColor)
}
return []string{output}
}