(remoteRefStorer storer.ReferenceStorer)
| 845 | } |
| 846 | |
| 847 | func getRemoteRefsFromStorer(remoteRefStorer storer.ReferenceStorer) ( |
| 848 | map[plumbing.Hash]bool, error) { |
| 849 | remoteRefs := map[plumbing.Hash]bool{} |
| 850 | iter, err := remoteRefStorer.IterReferences() |
| 851 | if err != nil { |
| 852 | return nil, err |
| 853 | } |
| 854 | err = iter.ForEach(func(ref *plumbing.Reference) error { |
| 855 | if ref.Type() != plumbing.HashReference { |
| 856 | return nil |
| 857 | } |
| 858 | remoteRefs[ref.Hash()] = true |
| 859 | return nil |
| 860 | }) |
| 861 | if err != nil { |
| 862 | return nil, err |
| 863 | } |
| 864 | return remoteRefs, nil |
| 865 | } |
| 866 | |
| 867 | // getHavesFromRef populates the given `haves` map with the given |
| 868 | // reference, and up to `maxHavesToVisitPerRef` ancestor commits. |
no test coverage detected