aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operation_pack.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-09-16 16:22:02 +0200
committerMichael Muré <batolettre@gmail.com>2020-10-04 20:39:10 +0200
commitca720f165cb286d4372ad48595e532a2423f2f07 (patch)
tree6e1496a1a6603abbd473cc0060a5acebc763a68b /bug/operation_pack.go
parentd56ce3d5d9f5ef74201a8ee7c25be4820d435b47 (diff)
downloadgit-bug-ca720f165cb286d4372ad48595e532a2423f2f07.tar.gz
cache,bug,identity: structural change
- bug doesn't commit identities anymore, only make sure they are commit - cache use an IdentityResolver to load bugs with identities from the cache (deps injection) - IdentityCache now are identity.Interface
Diffstat (limited to 'bug/operation_pack.go')
-rw-r--r--bug/operation_pack.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/bug/operation_pack.go b/bug/operation_pack.go
index 58c8381c..6a134b94 100644
--- a/bug/operation_pack.go
+++ b/bug/operation_pack.go
@@ -143,10 +143,11 @@ func (opp *OperationPack) Write(repo repository.ClockedRepo) (repository.Hash, e
}
// First, make sure that all the identities are properly Commit as well
+ // TODO: this might be downgraded to "make sure it exist in git" but then, what make
+ // sure no data is lost on identities ?
for _, op := range opp.Operations {
- err := op.base().Author.CommitAsNeeded(repo)
- if err != nil {
- return "", err
+ if op.base().Author.NeedCommit() {
+ return "", fmt.Errorf("identity need commmit")
}
}