MCPcopy Index your code
hub / github.com/go-git/go-git / NewObjectCommitNodeIndex

Function NewObjectCommitNodeIndex

plumbing/object/commitgraph/commitnode_object.go:22–24  ·  view source on GitHub ↗

NewObjectCommitNodeIndex returns CommitNodeIndex implementation that uses only object storage to load the nodes

(s storer.EncodedObjectStorer)

Source from the content-addressed store, hash-verified

20// NewObjectCommitNodeIndex returns CommitNodeIndex implementation that uses
21// only object storage to load the nodes
22func NewObjectCommitNodeIndex(s storer.EncodedObjectStorer) CommitNodeIndex {
23 return &objectCommitNodeIndex{s}
24}
25
26func (oci *objectCommitNodeIndex) Get(hash plumbing.Hash) (CommitNode, error) {
27 commit, err := object.GetCommit(oci.s, hash)

Callers 2

getCommitNodeIndexFunction · 0.92
TestObjectGraphMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestObjectGraphMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…