MCPcopy Create free account
hub / github.com/go-git/go-git / NewTreeRootNode

Function NewTreeRootNode

plumbing/object/treenoder.go:28–39  ·  view source on GitHub ↗

NewTreeRootNode returns the root node of a Tree

(t *Tree)

Source from the content-addressed store, hash-verified

26
27// NewTreeRootNode returns the root node of a Tree
28func NewTreeRootNode(t *Tree) noder.Noder {
29 if t == nil {
30 return &treeNoder{}
31 }
32
33 return &treeNoder{
34 parent: t,
35 name: "",
36 mode: filemode.Dir,
37 hash: t.Hash,
38 }
39}
40
41func (t *treeNoder) Skip() bool {
42 return false

Callers 2

diffTreeWithStagingMethod · 0.92
DiffTreeWithOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected