MCPcopy
hub / github.com/go-git/go-git / ObjectPackIdx

Method ObjectPackIdx

storage/filesystem/dotgit/dotgit.go:319–326  ·  view source on GitHub ↗

ObjectPackIdx returns a fs.File of the index file for a given packfile

(hash plumbing.Hash)

Source from the content-addressed store, hash-verified

317
318// ObjectPackIdx returns a fs.File of the index file for a given packfile
319func (d *DotGit) ObjectPackIdx(hash plumbing.Hash) (billy.File, error) {
320 err := d.hasPack(hash)
321 if err != nil {
322 return nil, err
323 }
324
325 return d.objectPackOpen(hash, `idx`)
326}
327
328func (d *DotGit) DeleteOldObjectPackAndIndex(hash plumbing.Hash, t time.Time) error {
329 d.cleanPackList()

Callers 7

loadIdxFileMethod · 0.80
TestPackfileIterMethod · 0.80
BenchmarkPackfileIterFunction · 0.80
TestObjectPackIdxMethod · 0.80

Calls 2

hasPackMethod · 0.95
objectPackOpenMethod · 0.95

Tested by 6

TestPackfileIterMethod · 0.64
BenchmarkPackfileIterFunction · 0.64
TestObjectPackIdxMethod · 0.64