diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2025-06-08 02:30:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-07 18:30:36 +0000 |
commit | cc942e2a86152939305b30373b618536d46aedca (patch) | |
tree | 509754493c2ad9c524c8fd9d7c8f56275fd9b0e6 /services | |
parent | 7fa5a88831141f9e7b858e282558e786b7e95716 (diff) | |
download | gitea-main.tar.gz gitea-main.zip |
Diffstat (limited to 'services')
-rw-r--r-- | services/git/commit.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/git/commit.go b/services/git/commit.go index d3ebcab569..2e0e8a5096 100644 --- a/services/git/commit.go +++ b/services/git/commit.go @@ -34,9 +34,9 @@ func ParseCommitsWithSignature(ctx context.Context, repo *repo_model.Repository, } for _, c := range oldCommits { - committer, ok := emailUsers[c.Committer.Email] - if !ok && c.Committer != nil { - committer = &user_model.User{ + committerUser := emailUsers.GetByEmail(c.Committer.Email) // FIXME: why ValidateCommitsWithEmails uses "Author", but ParseCommitsWithSignature uses "Committer"? + if committerUser == nil { + committerUser = &user_model.User{ Name: c.Committer.Name, Email: c.Committer.Email, } @@ -44,7 +44,7 @@ func ParseCommitsWithSignature(ctx context.Context, repo *repo_model.Repository, signCommit := &asymkey_model.SignCommit{ UserCommit: c, - Verification: asymkey_service.ParseCommitWithSignatureCommitter(ctx, c.Commit, committer), + Verification: asymkey_service.ParseCommitWithSignatureCommitter(ctx, c.Commit, committerUser), } isOwnerMemberCollaborator := func(user *user_model.User) (bool, error) { |