(
fs billy.Filesystem,
f billy.File,
t plumbing.ObjectType,
seen map[plumbing.Hash]struct{},
index idxfile.Index,
cache cache.Object,
keepPack bool,
largeObjectThreshold int64,
)
| 742 | } |
| 743 | |
| 744 | func newPackfileIter( |
| 745 | fs billy.Filesystem, |
| 746 | f billy.File, |
| 747 | t plumbing.ObjectType, |
| 748 | seen map[plumbing.Hash]struct{}, |
| 749 | index idxfile.Index, |
| 750 | cache cache.Object, |
| 751 | keepPack bool, |
| 752 | largeObjectThreshold int64, |
| 753 | ) (storer.EncodedObjectIter, error) { |
| 754 | var p *packfile.Packfile |
| 755 | if cache != nil { |
| 756 | p = packfile.NewPackfileWithCache(index, fs, f, cache, largeObjectThreshold) |
| 757 | } else { |
| 758 | p = packfile.NewPackfile(index, fs, f, largeObjectThreshold) |
| 759 | } |
| 760 | |
| 761 | iter, err := p.GetByType(t) |
| 762 | if err != nil { |
| 763 | return nil, err |
| 764 | } |
| 765 | |
| 766 | return &packfileIter{ |
| 767 | pack: f, |
| 768 | iter: iter, |
| 769 | seen: seen, |
| 770 | keepPack: keepPack, |
| 771 | }, nil |
| 772 | } |
| 773 | |
| 774 | func (iter *packfileIter) Next() (plumbing.EncodedObject, error) { |
| 775 | for { |
no test coverage detected