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

Function NewHashReference

plumbing/reference.go:254–260  ·  view source on GitHub ↗

NewHashReference creates a new HashReference reference

(n ReferenceName, h Hash)

Source from the content-addressed store, hash-verified

252
253// NewHashReference creates a new HashReference reference
254func NewHashReference(n ReferenceName, h Hash) *Reference {
255 return &Reference{
256 t: HashReference,
257 n: n,
258 h: h,
259 }
260}
261
262// Type returns the type of a reference
263func (r *Reference) Type() ReferenceType {

Callers 15

TestMergeFFMethod · 0.92
TestMergeFF_InvalidMethod · 0.92
CreateTagMethod · 0.92
updateReferencesMethod · 0.92
MergeMethod · 0.92
writeCommitToRefFunction · 0.92

Calls

no outgoing calls

Tested by 15

TestMergeFFMethod · 0.74
TestMergeFF_InvalidMethod · 0.74
writeCommitToRefFunction · 0.74
TestDefaultRemoteMethod · 0.74
TestCommitMethod · 0.74
TestAddReferenceHashMethod · 0.74
TestAllReferencesMethod · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…