Inconsistent commit signature color in Gitea v1.24 nightly #14563

Closed
opened 2025-11-02 11:16:20 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @noticebrick on GitHub (Jun 7, 2025).

Description

It appears that the method for obtaining avatar and signature status differs between the commit list and commit info. The primary cause of this issue is that the Git email does not match the gpg key's email, yet the behavior remains inconsistent across the two pages. Please feel free to comment if you need any further information.

Gitea Version

v1.24.0+rc0-51-g8defca6d39

Can you reproduce the bug on the Gitea demo site?

Yes

https://github.com/go-gitea/gitea/issues/34641#issuecomment-2952599068

https://demo.gitea.com/noticebrick/gitea/commits/branch/main

Image

Image

Originally created by @noticebrick on GitHub (Jun 7, 2025). ### Description It appears that the method for obtaining avatar and signature status differs between the commit list and commit info. The primary cause of this issue is that the Git email does not match the gpg key's email, yet the behavior remains inconsistent across the two pages. Please feel free to comment if you need any further information. ### Gitea Version v1.24.0+rc0-51-g8defca6d39 ### Can you reproduce the bug on the Gitea demo site? Yes https://github.com/go-gitea/gitea/issues/34641#issuecomment-2952599068 https://demo.gitea.com/noticebrick/gitea/commits/branch/main ![Image](https://github.com/user-attachments/assets/7ffffb73-cb5c-43ad-ad21-88aeebbc50ff) ![Image](https://github.com/user-attachments/assets/5f0f2ee1-d48d-4e2e-9e18-948216446ae1)
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 11:16:20 -06:00
Author
Owner

@noticebrick commented on GitHub (Jun 7, 2025):

I forgot to mention that the avatar is also not being resolved correctly.

@noticebrick commented on GitHub (Jun 7, 2025): I forgot to mention that the avatar is also not being resolved correctly.
Author
Owner

@wxiaoguang commented on GitHub (Jun 7, 2025):

What's the commit's email? What's your Gitea user's email?

@wxiaoguang commented on GitHub (Jun 7, 2025): What's the commit's email? What's your Gitea user's email?
Author
Owner

@noticebrick commented on GitHub (Jun 7, 2025):

I am currently replicating the issue in gitea demo site, please give me some time.

@noticebrick commented on GitHub (Jun 7, 2025): I am currently replicating the issue in gitea demo site, please give me some time.
Author
Owner

@noticebrick commented on GitHub (Jun 7, 2025):

What's the commit's email? What's your Gitea user's email?

https://demo.gitea.com/noticebrick/gitea
Commit email of "correct email": icebrick0312@gmail.com
Commit email of "wrong email": icebrick@light.tw
GPG Key Email: icebrick0312@gmail.com

Both emails have been added to Gitea user account while gmail.com is primary.

@noticebrick commented on GitHub (Jun 7, 2025): > What's the commit's email? What's your Gitea user's email? https://demo.gitea.com/noticebrick/gitea Commit email of "correct email": icebrick0312@gmail.com Commit email of "wrong email": icebrick@light.tw GPG Key Email: icebrick0312@gmail.com Both emails have been added to Gitea user account while gmail.com is primary.
Author
Owner

@wxiaoguang commented on GitHub (Jun 7, 2025):

Hmm, I think it's caused by the different "querying user's email" approaches (need to figure out the real problem) .....

@wxiaoguang commented on GitHub (Jun 7, 2025): Hmm, I think it's caused by ~~the different "querying user's email" approaches~~ (need to figure out the real problem) .....
Author
Owner

@noticebrick commented on GitHub (Jun 7, 2025):

By the way, the reason I commented under that issue is that their description somewhat matches the problem I am facing (different commit signature color and avatar), but the fix did not resolve my issue.

@noticebrick commented on GitHub (Jun 7, 2025): By the way, the reason I commented under that issue is that their description somewhat matches the problem I am facing (different commit signature color and avatar), but the fix did not resolve my issue.
Author
Owner

@wxiaoguang commented on GitHub (Jun 7, 2025):

Maybe it is another regression from Improve commits list performance to reduce unnecessary database queries (#33528)

At least, the new code seems wrong, why checking c.Committer != nil since has been used above? @lunny

		committer, ok := emailUsers[c.Committer.Email]
		if !ok && c.Committer != nil {
@wxiaoguang commented on GitHub (Jun 7, 2025): Maybe it is another regression from Improve commits list performance to reduce unnecessary database queries (#33528) At least, the new code seems wrong, why checking `c.Committer != nil` since has been used above? @lunny ``` committer, ok := emailUsers[c.Committer.Email] if !ok && c.Committer != nil { ```
Author
Owner

@wxiaoguang commented on GitHub (Jun 7, 2025):

Thank you for the detailed report. I think we can completely fix the problem by Fix GetUsersByEmails #34643

I tested your commits with your public gpg key:

Image

@wxiaoguang commented on GitHub (Jun 7, 2025): Thank you for the detailed report. I think we can completely fix the problem by Fix GetUsersByEmails #34643 I tested your commits with your public gpg key: ![Image](https://github.com/user-attachments/assets/7e92aee5-0567-4e82-ae2c-0a0c13f32e0f)
Author
Owner

@noticebrick commented on GitHub (Jun 8, 2025):

Tested on the latest v1.24 nightly and the issue is fixed, thank you!

@noticebrick commented on GitHub (Jun 8, 2025): Tested on the latest v1.24 nightly and the issue is fixed, thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14563