1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
lazygit/pkg/gui/filetree
Jesse Duffield 1dd7307fde start moving commit panel handlers into controller
more

and more

move rebase commit refreshing into existing abstraction

and more

and more

WIP

and more

handling clicks

properly fix merge conflicts

update cheatsheet

lots more preparation to start moving things into controllers

WIP

better typing

expand on remotes controller

moving more code into controllers
2022-03-17 19:13:40 +11:00
..
build_tree_test.go more treeish files 2021-07-27 21:52:42 +10:00
build_tree.go bubble up tracked files in flat file view 2021-04-17 10:04:49 +10:00
collapsed_paths.go support file tree mode on windows 2021-04-08 21:33:17 +10:00
commit_file_node.go start moving commit panel handlers into controller 2022-03-17 19:13:40 +11:00
commit_file_tree_view_model.go properly resolve cyclic dependency 2022-01-22 10:48:51 +11:00
file_node_test.go improve merge conflict flow 2022-01-26 14:50:47 +11:00
file_node.go start moving commit panel handlers into controller 2022-03-17 19:13:40 +11:00
file_tree_view_model_test.go show only merge conflict files when there are merge conflicts 2022-01-26 20:28:32 +11:00
file_tree_view_model.go show only merge conflict files when there are merge conflicts 2022-01-26 20:28:32 +11:00
inode.go properly resolve cyclic dependency 2022-01-22 10:48:51 +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.