lazygit/pkg/gui/filetree
Jesse Duffield 7e85cdd027 Allow user to filter the files view to only show untracked files
This handles the situation where the user's own config says to not show
untracked files, as is often the case with bare repos managing a user's
dotfiles.
2025-02-07 09:04:55 +11:00
..
build_tree.go Use map to quickly find children in BuildTreeFromFiles 2024-09-18 09:16:58 +02:00
build_tree_test.go Remove redundant variable dedeclarations 2024-05-19 16:38:21 +10:00
collapsed_paths.go Collapse/expand all files in tree 2025-01-13 21:13:11 +01:00
commit_file_node.go handle nil properly with file nodes 2022-08-01 20:32:01 +10:00
commit_file_tree.go Collapse/expand all files in tree 2025-01-13 21:13:11 +01:00
commit_file_tree_view_model.go Collapse/expand all files in tree 2025-01-13 21:13:11 +01:00
file_node.go Actually look for conflict markers in GetHasInlineMergeConflicts 2024-09-02 18:12:47 +02:00
file_node_test.go Remove redundant variable dedeclarations 2024-05-19 16:38:21 +10:00
file_tree.go Allow user to filter the files view to only show untracked files 2025-02-07 09:04:55 +11:00
file_tree_test.go Add new filter to only show tracked files in Files panel 2024-11-12 16:54:24 +11:00
file_tree_view_model.go Collapse/expand all files in tree 2025-01-13 21:13:11 +01:00
node.go Support range select for staging/discarding files 2024-01-25 11:34:59 +11:00
README.md properly resolve cyclic dependency 2022-01-22 10:48:51 +11:00

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.