aboutsummaryrefslogtreecommitdiffstats
path: root/bug/bug_actions.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-03-10 16:27:22 +0100
committerMichael Muré <batolettre@gmail.com>2022-03-10 16:30:27 +0100
commitb11679bc80b115c61a5cdee8ff8b5f8f1f69533d (patch)
tree956495036e383caab11006239e31e591436a33cd /bug/bug_actions.go
parentdf55cc49a85eaf3a2d3c2ceb1fbcccac19fa6eb8 (diff)
downloadgit-bug-b11679bc80b115c61a5cdee8ff8b5f8f1f69533d.tar.gz
Fix a bunch of comments and documentations
Diffstat (limited to 'bug/bug_actions.go')
-rw-r--r--bug/bug_actions.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/bug/bug_actions.go b/bug/bug_actions.go
index 420fb08a..c8239e41 100644
--- a/bug/bug_actions.go
+++ b/bug/bug_actions.go
@@ -22,13 +22,15 @@ func Push(repo repository.Repo, remote string) (string, error) {
// Pull will do a Fetch + MergeAll
// This function will return an error if a merge fail
-func Pull(repo repository.ClockedRepo, remote string, author identity.Interface) error {
+// 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 Pull(repo repository.ClockedRepo, remote string, mergeAuthor identity.Interface) error {
_, err := Fetch(repo, remote)
if err != nil {
return err
}
- for merge := range MergeAll(repo, remote, author) {
+ for merge := range MergeAll(repo, remote, mergeAuthor) {
if merge.Err != nil {
return merge.Err
}
@@ -43,7 +45,7 @@ func Pull(repo repository.ClockedRepo, remote string, author identity.Interface)
// MergeAll will merge all the available remote bug
// 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(repo repository.ClockedRepo, remote string, author identity.Interface) <-chan entity.MergeResult {
+func MergeAll(repo repository.ClockedRepo, remote string, mergeAuthor identity.Interface) <-chan entity.MergeResult {
// no caching for the merge, we load everything from git even if that means multiple
// copy of the same entity in memory. The cache layer will intercept the results to
// invalidate entities if necessary.
@@ -54,7 +56,7 @@ func MergeAll(repo repository.ClockedRepo, remote string, author identity.Interf
go func() {
defer close(out)
- results := dag.MergeAll(def, repo, identityResolver, remote, author)
+ results := dag.MergeAll(def, repo, identityResolver, remote, mergeAuthor)
// wrap the dag.Entity into a complete Bug
for result := range results {