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

Method Get

plumbing/object/commitgraph/commitnode_object.go:26–36  ·  view source on GitHub ↗
(hash plumbing.Hash)

Source from the content-addressed store, hash-verified

24}
25
26func (oci *objectCommitNodeIndex) Get(hash plumbing.Hash) (CommitNode, error) {
27 commit, err := object.GetCommit(oci.s, hash)
28 if err != nil {
29 return nil, err
30 }
31
32 return &objectCommitNode{
33 nodeIndex: oci,
34 commit: commit,
35 }, nil
36}
37
38// objectCommitNodeIndex is an index that can load CommitNode objects only from the
39// object store.

Callers

nothing calls this directly

Calls 1

GetCommitFunction · 0.92

Tested by

no test coverage detected