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

Function NewGraphCommitNodeIndex

plumbing/object/commitgraph/commitnode_graph.go:39–41  ·  view source on GitHub ↗

NewGraphCommitNodeIndex returns CommitNodeIndex implementation that uses commit-graph files as backing storage and falls back to object storage when necessary

(commitGraph commitgraph.Index, s storer.EncodedObjectStorer)

Source from the content-addressed store, hash-verified

37// NewGraphCommitNodeIndex returns CommitNodeIndex implementation that uses commit-graph
38// files as backing storage and falls back to object storage when necessary
39func NewGraphCommitNodeIndex(commitGraph commitgraph.Index, s storer.EncodedObjectStorer) CommitNodeIndex {
40 return &graphCommitNodeIndex{commitGraph, s}
41}
42
43func (gci *graphCommitNodeIndex) Get(hash plumbing.Hash) (CommitNode, error) {
44 if gci.commitGraph != nil {

Callers 4

getCommitNodeIndexFunction · 0.92
TestCommitNodeIterMethod · 0.85
TestCommitGraphMethod · 0.85
TestMixedGraphMethod · 0.85

Calls

no outgoing calls

Tested by 3

TestCommitNodeIterMethod · 0.68
TestCommitGraphMethod · 0.68
TestMixedGraphMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…