(remoteRefStorer storer.ReferenceStorer)
| 859 | } |
| 860 | |
| 861 | func 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. |
no test coverage detected
searching dependent graphs…