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

Function findReference

storage/filesystem/dotgit/dotgit_test.go:473–482  ·  view source on GitHub ↗
(refs []*plumbing.Reference, name string)

Source from the content-addressed store, hash-verified

471}
472
473func findReference(refs []*plumbing.Reference, name string) *plumbing.Reference {
474 n := plumbing.ReferenceName(name)
475 for _, ref := range refs {
476 if ref.Name() == n {
477 return ref
478 }
479 }
480
481 return nil
482}
483
484func (s *SuiteDotGit) TestObjectPacks(c *C) {
485 f := fixtures.Basic().ByTag(".git").One()

Calls 2

ReferenceNameTypeAlias · 0.92
NameMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…