aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorAthanasios Oikonomou <athoik@gmail.com>2023-11-01 17:58:48 +0200
committerGitHub <noreply@github.com>2023-11-01 11:58:48 -0400
commitc531da02caa5ec15279718e1ba045b61e47561a8 (patch)
tree73cdb319577e95e4b1b5d6cb808e5ac4fdba74af /internal
parentbc1b5e52a9961ba975019e326f7ab80d30ffcb9b (diff)
commit: fix `matchUsersWithCommitEmails` (#7561)
Co-authored-by: Joe Chen <jc@unknwon.io>
Diffstat (limited to 'internal')
-rw-r--r--internal/route/repo/commit.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/route/repo/commit.go b/internal/route/repo/commit.go
index f82336d9..b2be6d5b 100644
--- a/internal/route/repo/commit.go
+++ b/internal/route/repo/commit.go
@@ -200,7 +200,8 @@ func matchUsersWithCommitEmails(ctx gocontext.Context, oldCommits []*git.Commit)
for i := range oldCommits {
var u *db.User
if v, ok := emailToUsers[oldCommits[i].Author.Email]; !ok {
- emailToUsers[oldCommits[i].Author.Email], _ = db.Users.GetByEmail(ctx, oldCommits[i].Author.Email)
+ u, _ = db.Users.GetByEmail(ctx, oldCommits[i].Author.Email)
+ emailToUsers[oldCommits[i].Author.Email] = u
} else {
u = v
}