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

Struct node

utils/merkletrie/filesystem/node.go:34–47  ·  view source on GitHub ↗

The node represents a file or a directory in a billy.Filesystem. It implements the interface noder.Noder of merkletrie package. This implementation implements a "standard" hash method being able to be compared with any other noder.Noder implementation inside of go-git.

Source from the content-addressed store, hash-verified

32// This implementation implements a "standard" hash method being able to be
33// compared with any other noder.Noder implementation inside of go-git.
34type node struct {
35 fs billy.Filesystem
36 submodules map[string]plumbing.Hash
37 idx *index.Index
38 idxMap map[string]*index.Entry
39
40 path string
41 hash []byte
42 children []noder.Noder
43 isDir bool
44 mode os.FileMode
45 size int64
46 modTime time.Time
47}
48
49// NewRootNode returns the root node based on a given billy.Filesystem.
50//

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected