summaryrefslogtreecommitdiffstatshomepage
path: root/entity/dag/entity_actions.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2023-08-14 16:58:06 +0200
committerMichael Muré <batolettre@gmail.com>2023-08-14 16:58:06 +0200
commit297e1931a7b5913275e8e9b0a46494d95e7e5e7c (patch)
tree5c5ef10f66bff4f9e6e3bbe87c70c02940bdbce3 /entity/dag/entity_actions.go
parentf0167a1d6068d22af5ffff260e2848f7c14a71b3 (diff)
downloadgit-bug-bootstrap-rework-2.tar.gz
git-bug-bootstrap-rework-2.zip
Diffstat (limited to 'entity/dag/entity_actions.go')
-rw-r--r--entity/dag/entity_actions.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/entity/dag/entity_actions.go b/entity/dag/entity_actions.go
index 3c3f819f..5afca124 100644
--- a/entity/dag/entity_actions.go
+++ b/entity/dag/entity_actions.go
@@ -5,7 +5,6 @@ import (
"github.com/pkg/errors"
- "github.com/MichaelMure/git-bug/entities/identity"
"github.com/MichaelMure/git-bug/entity"
"github.com/MichaelMure/git-bug/repository"
)
@@ -32,7 +31,7 @@ func Push(def Definition, repo repository.Repo, remote string) (string, error) {
// Pull will do a Fetch + MergeAll
// Contrary to MergeAll, this function will return an error if a merge fail.
-func Pull[EntityT entity.Bare](def Definition, wrapper func(e *Entity) EntityT, repo repository.ClockedRepo, resolvers entity.Resolvers, remote string, author identity.Interface) error {
+func Pull[EntityT entity.Bare](def Definition, wrapper func(e *Entity) EntityT, repo repository.ClockedRepo, resolvers entity.Resolvers, remote string, author entity.Identity) error {
_, err := Fetch(def, repo, remote)
if err != nil {
return err
@@ -68,7 +67,7 @@ func Pull[EntityT entity.Bare](def Definition, wrapper func(e *Entity) EntityT,
//
// Note: an author is necessary for the case where a merge commit is created, as this commit will
// have an author and may be signed if a signing key is available.
-func MergeAll[EntityT entity.Bare](def Definition, wrapper func(e *Entity) EntityT, repo repository.ClockedRepo, resolvers entity.Resolvers, remote string, author identity.Interface) <-chan entity.MergeResult {
+func MergeAll[EntityT entity.Bare](def Definition, wrapper func(e *Entity) EntityT, repo repository.ClockedRepo, resolvers entity.Resolvers, remote string, author entity.Identity) <-chan entity.MergeResult {
out := make(chan entity.MergeResult)
go func() {
@@ -91,7 +90,7 @@ func MergeAll[EntityT entity.Bare](def Definition, wrapper func(e *Entity) Entit
// merge perform a merge to make sure a local Entity is up-to-date.
// See MergeAll for more details.
-func merge[EntityT entity.Bare](def Definition, wrapper func(e *Entity) EntityT, repo repository.ClockedRepo, resolvers entity.Resolvers, remoteRef string, author identity.Interface) entity.MergeResult {
+func merge[EntityT entity.Bare](def Definition, wrapper func(e *Entity) EntityT, repo repository.ClockedRepo, resolvers entity.Resolvers, remoteRef string, author entity.Identity) entity.MergeResult {
id := entity.RefToId(remoteRef)
if err := id.Validate(); err != nil {