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

Function getCommitTree

_examples/ls/main.go:105–120  ·  view source on GitHub ↗
(c commitgraph.CommitNode, treePath string)

Source from the content-addressed store, hash-verified

103}
104
105func getCommitTree(c commitgraph.CommitNode, treePath string) (*object.Tree, error) {
106 tree, err := c.Tree()
107 if err != nil {
108 return nil, err
109 }
110
111 // Optimize deep traversals by focusing only on the specific tree
112 if treePath != "" {
113 tree, err = tree.Tree(treePath)
114 if err != nil {
115 return nil, err
116 }
117 }
118
119 return tree, nil
120}
121
122func getFullPath(treePath, path string) string {
123 if treePath != "" {

Callers 1

getFileHashesFunction · 0.85

Calls 1

TreeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…