MCPcopy Create free account
hub / github.com/go-git/go-git / SetReference

Method SetReference

storage/memory/storage.go:248–254  ·  view source on GitHub ↗
(ref *plumbing.Reference)

Source from the content-addressed store, hash-verified

246type ReferenceStorage map[plumbing.ReferenceName]*plumbing.Reference
247
248func (r ReferenceStorage) SetReference(ref *plumbing.Reference) error {
249 if ref != nil {
250 r[ref.Name()] = ref
251 }
252
253 return nil
254}
255
256func (r ReferenceStorage) CheckAndSetReference(ref, old *plumbing.Reference) error {
257 if ref == nil {

Callers

nothing calls this directly

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected