aboutsummaryrefslogtreecommitdiffstats
path: root/entity/dag/clock.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-02-14 10:02:01 +0100
committerMichael Muré <batolettre@gmail.com>2021-02-14 12:19:04 +0100
commit94f06cd54defa73f5e8b79345597279e454c78e6 (patch)
tree28a1369af0b975e80ed714d5dfacc6ef7ed8911b /entity/dag/clock.go
parent71e22d9f6e49ce0c3bc3b177323b17652a1c45a2 (diff)
downloadgit-bug-94f06cd54defa73f5e8b79345597279e454c78e6.tar.gz
entity: pass the identity resolver instead of defining it once
Having the resolver in Definition doesn't actually work well as the resolver is very situational.
Diffstat (limited to 'entity/dag/clock.go')
-rw-r--r--entity/dag/clock.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/entity/dag/clock.go b/entity/dag/clock.go
index fa944b33..c9d2b94b 100644
--- a/entity/dag/clock.go
+++ b/entity/dag/clock.go
@@ -22,14 +22,10 @@ func ClockLoader(defs ...Definition) repository.ClockLoader {
resolver := identity.NewStubResolver()
for _, def := range defs {
- // override the resolver
- def := def
- def.identityResolver = resolver
-
// we actually just need to read all entities,
// as that will create and update the clocks
// TODO: concurrent loading to be faster?
- for b := range ReadAll(def, repo) {
+ for b := range ReadAll(def, repo, resolver) {
if b.Err != nil {
return b.Err
}