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

Function getCommitNodeIndex

_examples/ls/main.go:84–95  ·  view source on GitHub ↗
(r *git.Repository, fs billy.Filesystem)

Source from the content-addressed store, hash-verified

82}
83
84func getCommitNodeIndex(r *git.Repository, fs billy.Filesystem) (commitgraph.CommitNodeIndex, io.ReadCloser) {
85 file, err := fs.Open(path.Join("objects", "info", "commit-graph"))
86 if err == nil {
87 index, err := commitgraph_fmt.OpenFileIndex(file)
88 if err == nil {
89 return commitgraph.NewGraphCommitNodeIndex(index, r.Storer), file
90 }
91 file.Close()
92 }
93
94 return commitgraph.NewObjectCommitNodeIndex(r.Storer), nil
95}
96
97type commitAndPaths struct {
98 commit commitgraph.CommitNode

Callers 1

mainFunction · 0.85

Calls 5

NewGraphCommitNodeIndexFunction · 0.92
NewObjectCommitNodeIndexFunction · 0.92
JoinMethod · 0.80
CloseMethod · 0.65
OpenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…