Skip to content

Refactor commit reader #34542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 27, 2025
Merged

Refactor commit reader #34542

merged 3 commits into from
May 27, 2025

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented May 27, 2025

No description provided.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 27, 2025
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label May 27, 2025
@wxiaoguang wxiaoguang force-pushed the fix-commit-reader branch from 1d6f91c to 1f43769 Compare May 27, 2025 02:26
@Byron
Copy link

Byron commented May 27, 2025

I just want to highlight that Git solves this by 'cutting' out the signature, leaving only the parts of the commits that should be signed, independently of possibly unknown header fields.

https://github.com/git/git/blob/cb96e1697ad6e54d11fc920c95f82977f8e438f8/commit.c#L1170-L1213

This also makes the approach more resilient against unconventionally formatted commits, I believe.

@wxiaoguang
Copy link
Contributor Author

I just want to highlight that Git solves this by 'cutting' out the signature, leaving only the parts of the commits that should be signed, independently of possibly unknown header fields.

That's what I do in this PR

@wxiaoguang wxiaoguang added the backport/v1.24 This PR should be backported to Gitea 1.24 label May 27, 2025
@wxiaoguang wxiaoguang added this to the 1.25.0 milestone May 27, 2025
lunny

This comment was marked as resolved.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 27, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 27, 2025
@wxiaoguang wxiaoguang enabled auto-merge (squash) May 27, 2025 16:24
@wxiaoguang wxiaoguang disabled auto-merge May 27, 2025 16:25
@wxiaoguang wxiaoguang enabled auto-merge (squash) May 27, 2025 16:25
@wxiaoguang wxiaoguang merged commit 9f10885 into go-gitea:main May 27, 2025
26 checks passed
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request May 27, 2025
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label May 27, 2025
@wxiaoguang wxiaoguang deleted the fix-commit-reader branch May 27, 2025 16:49
wxiaoguang added a commit that referenced this pull request May 27, 2025
Backport #34542 by wxiaoguang

Co-authored-by: wxiaoguang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/done All backports for this PR have been created backport/v1.24 This PR should be backported to Gitea 1.24 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants