1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-10-08 22:52:12 +02:00

Extract a InternalTreePathForFilePath helper function

This commit is contained in:
Stefan Haller
2025-10-06 17:29:27 +02:00
parent 97762f484f
commit 6b6893bcae

View File

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