MCPcopy
hub / github.com/go-git/go-git / treeNoder

Struct treeNoder

plumbing/object/treenoder.go:19–25  ·  view source on GitHub ↗

A treenoder is a helper type that wraps git trees into merkletrie noders. As a merkletrie noder doesn't understand the concept of modes (e.g. file permissions), the treenoder includes the mode of the git tree in the hash, so changes in the modes will be detected as modifications to the file content

Source from the content-addressed store, hash-verified

17// to the file contents by the merkletrie difftree algorithm. This is
18// consistent with how the "git diff-tree" command works.
19type treeNoder struct {
20 parent *Tree // the root node is its own parent
21 name string // empty string for the root node
22 mode filemode.FileMode
23 hash plumbing.Hash
24 children []noder.Noder // memoized
25}
26
27// NewTreeRootNode returns the root node of a Tree
28func NewTreeRootNode(t *Tree) noder.Noder {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected