Files
lazygit/pkg/gui/filetree
Stefan HallerandClaude Opus 5.5 90039cf7e2 Remove the unused AppState field from Common
Nothing reads it. It's a pointer to the AppConfig's in-memory copy of
state.yml, which the following commits replace with fresh reads of the
file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:10:58 +01:00
..
2025-03-20 12:31:34 +01:00
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.