jesseduffield.lazygit/pkg/gui/filetree
2025-10-09 09:58:15 +02:00
..
build_tree.go Extract a InternalTreePathForFilePath helper function 2025-10-09 09:58:10 +02:00
build_tree_test.go Add user config gui.addRootItemInFileTree 2025-05-24 18:17:25 +02:00
collapsed_paths.go
commit_file_node.go
commit_file_tree.go Add user config gui.addRootItemInFileTree 2025-05-24 18:17:25 +02:00
commit_file_tree_view_model.go When entering a commit in path filtering mode, select the filtered path 2025-10-09 09:58:15 +02:00
file_node.go
file_node_test.go
file_tree.go Add user config gui.addRootItemInFileTree 2025-05-24 18:17:25 +02:00
file_tree_test.go
file_tree_view_model.go Enable revive linter, and fix a bunch of warnings 2025-06-30 19:13:20 +02:00
node.go Fix discarding submodule changes in nested folders 2025-04-07 09:42:19 +02:00
README.md

FileTree Package

This package handles the representation of file trees. There are two ways to render files: one is to render them flat, so something like this:

dir1/file1
dir1/file2
file3

And the other is to render them as a tree

dir1/
  file1
  file2
file3

Internally we represent each of the above as a tree, but with the flat approach there's just a single root node and every path is a direct child of that root. Viewing in 'tree' mode (as opposed to 'flat' mode) allows for collapsing and expanding directories, and lets you perform actions on directories e.g. staging a whole directory. But it takes up more vertical space and sometimes you just want to have a flat view where you can go flick through your files one by one to see the diff.

This package is not concerned about rendering the tree: only representing its internal state.