diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c543f8d1..9d4d2866c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to Gogs are documented in this file. ### Fixed - Submodules using `ssh://` protocol and a port number are not rendered correctly. [#4941](https://github.com/gogs/gogs/issues/4941) +- Missing link to user profile on the first commit in commits history page. [#7404](https://github.com/gogs/gogs/issues/7404) ## 0.13.0 diff --git a/internal/route/repo/commit.go b/internal/route/repo/commit.go index f82336d97..b2be6d5bf 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 }