MCPcopy Create free account
hub / github.com/git-bug/git-bug / ReadAllClocksNoCheck

Function ReadAllClocksNoCheck

entity/dag/entity.go:342–358  ·  view source on GitHub ↗

ReadAllClocksNoCheck goes over all entities matching Definition and read/witness the corresponding clocks so that the repo end up with correct clocks for the next write.

(def Definition, repo repository.ClockedRepo)

Source from the content-addressed store, hash-verified

340// ReadAllClocksNoCheck goes over all entities matching Definition and read/witness the corresponding clocks so that the
341// repo end up with correct clocks for the next write.
342func ReadAllClocksNoCheck(def Definition, repo repository.ClockedRepo) error {
343 refPrefix := fmt.Sprintf("refs/%s/", def.Namespace)
344
345 refs, err := repo.ListRefs(refPrefix)
346 if err != nil {
347 return err
348 }
349
350 for _, ref := range refs {
351 err = readClockNoCheck(def, repo, ref)
352 if err != nil {
353 return err
354 }
355 }
356
357 return nil
358}
359
360// Id return the Entity identifier
361func (e *Entity) Id() entity.Id {

Callers 1

ClockLoaderFunction · 0.85

Calls 2

readClockNoCheckFunction · 0.85
ListRefsMethod · 0.65

Tested by

no test coverage detected