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

Function getRemoteRefsFromStorer

remote.go:861–879  ·  view source on GitHub ↗
(remoteRefStorer storer.ReferenceStorer)

Source from the content-addressed store, hash-verified

859}
860
861func getRemoteRefsFromStorer(remoteRefStorer storer.ReferenceStorer) (
862 map[plumbing.Hash]bool, error) {
863 remoteRefs := map[plumbing.Hash]bool{}
864 iter, err := remoteRefStorer.IterReferences()
865 if err != nil {
866 return nil, err
867 }
868 err = iter.ForEach(func(ref *plumbing.Reference) error {
869 if ref.Type() != plumbing.HashReference {
870 return nil
871 }
872 remoteRefs[ref.Hash()] = true
873 return nil
874 })
875 if err != nil {
876 return nil, err
877 }
878 return remoteRefs, nil
879}
880
881// getHavesFromRef populates the given `haves` map with the given
882// reference, and up to `maxHavesToVisitPerRef` ancestor commits.

Callers 1

getHavesFunction · 0.85

Calls 4

IterReferencesMethod · 0.65
ForEachMethod · 0.65
TypeMethod · 0.65
HashMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…