- Notifications
You must be signed in to change notification settings - Fork838
plumbing: support commits extra headers, support jujutsu signed commit [5.x]#1633
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
pjbgf merged 1 commit intogo-git:releases/v5.xfrombaloo:baloo/release-5.x/jj-signed-commitsSep 17, 2025
Merged
plumbing: support commits extra headers, support jujutsu signed commit [5.x]#1633
pjbgf merged 1 commit intogo-git:releases/v5.xfrombaloo:baloo/release-5.x/jj-signed-commitsSep 17, 2025
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
8e9c1d5
todf9f1d1
Compare45a4957
to9786f5e
CompareThis adds support for extra headers. While git has a set of ["standard headers"] (`tree`, `parent`, `author`, `committer`, and`encoding`), it will also support [extra headers] when serializing.The extra headers must come after the standard ones, but they areotherwise freetyped.[Jujutsu] takes advantage of that to store its own identifier(`change-id`) as an extra header.Because signatures will cover the hash of the whole commit (standardheaders, extra headers and the message. Everything but the signatureitself), if we deserialize a commit and then `EncodeWithoutSignature` toget back the "canonical" representation of a commit, if we don'tserialize back the extra headers, the hash will no longer match and thesignature will fail to verify.This adds support for parsing and reencoding the extra headers from theoriginal commit and it's expected to fix support for Jujutsu signedcommits.Fixesgo-git#1626["standard headers"]:https://github.com/git/git/blob/724518f3884d8707c5f51428ba98c115818229b8/commit.c#L1450[extra headers]:https://github.com/git/git/blob/724518f3884d8707c5f51428ba98c115818229b8/commit.c#L1690[Jujutsu]:https://github.com/jj-vcs/jj
9786f5e
tof2c3467
Comparerebased on#1646 to fix CI |
pjbgf approved these changesSep 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@baloo thanks for backporting this. 🙇
ad9a3a5
intogo-git:releases/v5.x 12 checks passed
Uh oh!
There was an error while loading.Please reload this page.
project-mirrors-bot-tubot pushed a commit to project-mirrors/forgejo-runner that referenced this pull requestOct 11, 2025
This PR contains the following updates:| Package | Change | Age | Confidence ||---|---|---|---|| [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) | `v5.16.2` -> `v5.16.3` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |---### Release Notes<details><summary>go-git/go-git (github.com/go-git/go-git/v5)</summary>### [`v5.16.3`](https://github.com/go-git/go-git/releases/tag/v5.16.3)[Compare Source](go-git/go-git@v5.16.2...v5.16.3)#### What's Changed- internal: Expand regex to fix build \[5.x] by [@​baloo](https://github.com/baloo) in [#​1644](go-git/go-git#1644)- build: raise timeouts for windows CI tests and disable CIFuzz \[5.x] by [@​baloo](https://github.com/baloo) in [#​1646](go-git/go-git#1646)- plumbing: support commits extra headers, support jujutsu signed commit \[5.x] by [@​baloo](https://github.com/baloo) in [#​1633](go-git/go-git#1633)**Full Changelog**: <go-git/go-git@v5.16.2...v5.16.3></details>---### Configuration📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.🔕 **Ignore**: Close this PR and you won't be reminded about this update again.--- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box---This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMzEuOSIsInVwZGF0ZWRJblZlciI6IjQxLjEzMS45IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJLaW5kL0RlcGVuZGVuY3lVcGRhdGUiLCJydW4tZW5kLXRvLWVuZC10ZXN0cyJdfQ==-->Reviewed-on:https://code.forgejo.org/forgejo/runner/pulls/1062Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>Co-authored-by: Renovate Bot <bot@kriese.eu>Co-committed-by: Renovate Bot <bot@kriese.eu>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support for extra headers. While git has a set of"standard headers" (
tree
,parent
,author
,committer
, andencoding
), it will also supportextra headers when serializing.The extra headers must come after the standard ones, but they are otherwise freetyped.
Jujutsu takes advantage of that to store its own identifier (
change-id
) as an extra header.Because signatures will cover the hash of the whole commit (standard headers, extra headers and the message. Everything but the signature itself), if we deserialize a commit and then
EncodeWithoutSignature
to get back the "canonical" representation of a commit, if we don't serialize back the extra headers, the hash will no longer match and the signature will fail to verify.This adds support for parsing and reencoding the extra headers from the original commit and it's expected to fix support for Jujutsu signed commits.
Fixes#1626
This is a backport of#1627 targeting
release-5.x