mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-29 00:51:35 +02:00
properly resolve cyclic dependency
This commit is contained in:
pkg
commands
git_commands
gui
commit_files_panel.gofiles_panel.go
filetree
README.mdcommit_file_manager.gocommit_file_node.gocommit_file_tree_view_model.goconstants.gofile_manager.gofile_manager_test.gofile_node.gofile_tree_view_model.gofile_tree_view_model_test.goinode.gopresentation.go
gui.goline_by_line_panel.golist_context_config.gopatch_building_panel.gopresentation
submodules_panel.go@ -11,6 +11,8 @@ type CommitFileNode struct {
|
||||
CompressionLevel int // equal to the number of forward slashes you'll see in the path when it's rendered in tree mode
|
||||
}
|
||||
|
||||
var _ INode = &CommitFileNode{}
|
||||
|
||||
// methods satisfying ListItem interface
|
||||
|
||||
func (s *CommitFileNode) ID() string {
|
||||
@ -23,6 +25,10 @@ func (s *CommitFileNode) Description() string {
|
||||
|
||||
// methods satisfying INode interface
|
||||
|
||||
func (s *CommitFileNode) IsNil() bool {
|
||||
return s == nil
|
||||
}
|
||||
|
||||
func (s *CommitFileNode) IsLeaf() bool {
|
||||
return s.File != nil
|
||||
}
|
||||
@ -139,13 +145,6 @@ func (s *CommitFileNode) Compress() {
|
||||
compressAux(s)
|
||||
}
|
||||
|
||||
// This ignores the root
|
||||
func (node *CommitFileNode) GetPathsMatching(test func(*CommitFileNode) bool) []string {
|
||||
return getPathsMatching(node, func(n INode) bool {
|
||||
return test(n.(*CommitFileNode))
|
||||
})
|
||||
}
|
||||
|
||||
func (s *CommitFileNode) GetLeaves() []*CommitFileNode {
|
||||
leaves := getLeaves(s)
|
||||
castLeaves := make([]*CommitFileNode, len(leaves))
|
||||
|
Reference in New Issue
Block a user