MCPcopy Create free account
hub / github.com/go-git/go-git / genObjectList

Method genObjectList

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

Source from the content-addressed store, hash-verified

479}
480
481func (d *DotGit) genObjectList() error {
482 if d.objectMap != nil {
483 return nil
484 }
485
486 d.objectMap = make(map[plumbing.Hash]struct{})
487 populate := func(h plumbing.Hash) error {
488 d.objectList = append(d.objectList, h)
489 d.objectMap[h] = struct{}{}
490
491 return nil
492 }
493 if err := d.forEachObjectHash(populate); err != nil {
494 return err
495 }
496 plumbing.HashesSort(d.objectList)
497 return nil
498}
499
500func (d *DotGit) hasObject(h plumbing.Hash) error {
501 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