1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-23 22:24:51 +02:00

Extract a InternalTreePathForFilePath helper function

This commit is contained in:
Stefan Haller
2025-10-06 17:29:27 +02:00
parent fb00584f4d
commit 5811f2945c

View File

@@ -162,9 +162,13 @@ func join(strs []string) string {
} }
func SplitFileTreePath(path string, showRootItem bool) []string { func SplitFileTreePath(path string, showRootItem bool) []string {
if showRootItem { return split(InternalTreePathForFilePath(path, showRootItem))
return split("./" + path)
} }
return split(path) func InternalTreePathForFilePath(path string, showRootItem bool) string {
if showRootItem {
return "./" + path
}
return path
} }