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

Method genObjectList

storage/filesystem/dotgit/dotgit.go:488–505  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

486}
487
488func (d *DotGit) genObjectList() error {
489 if d.objectMap != nil {
490 return nil
491 }
492
493 d.objectMap = make(map[plumbing.Hash]struct{})
494 populate := func(h plumbing.Hash) error {
495 d.objectList = append(d.objectList, h)
496 d.objectMap[h] = struct{}{}
497
498 return nil
499 }
500 if err := d.forEachObjectHash(populate); err != nil {
501 return err
502 }
503 plumbing.HashesSort(d.objectList)
504 return nil
505}
506
507func (d *DotGit) hasObject(h plumbing.Hash) error {
508 if !d.options.ExclusiveAccess {

Callers 4

ObjectsWithPrefixMethod · 0.95
ObjectsMethod · 0.95
ForEachObjectHashMethod · 0.95
hasObjectMethod · 0.95

Calls 2

forEachObjectHashMethod · 0.95
HashesSortFunction · 0.92

Tested by

no test coverage detected