Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Conversation

baloo
Copy link
Contributor

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 thenEncodeWithoutSignature 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 targetingrelease-5.x

jsoo1 reacted with thumbs up emoji
@baloobalooforce-pushed thebaloo/release-5.x/jj-signed-commits branch from8e9c1d5 todf9f1d1CompareAugust 21, 2025 16:19
@baloobaloo changed the title[5.x] commit: support extra headers, support jujutsu signed commitplumbing: support extra headers, support jujutsu signed commit [5.x]Aug 21, 2025
@baloobaloo changed the titleplumbing: support extra headers, support jujutsu signed commit [5.x]plumbing: support commits extra headers, support jujutsu signed commit [5.x]Aug 21, 2025
@baloobalooforce-pushed thebaloo/release-5.x/jj-signed-commits branch 2 times, most recently from45a4957 to9786f5eCompareSeptember 7, 2025 23:38
This 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
@baloobalooforce-pushed thebaloo/release-5.x/jj-signed-commits branch from9786f5e tof2c3467CompareSeptember 12, 2025 15:01
@baloo
Copy link
ContributorAuthor

rebased on#1646 to fix CI

Copy link
Member

@pjbgfpjbgf left a 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. 🙇

@pjbgfpjbgf merged commitad9a3a5 intogo-git:releases/v5.xSep 17, 2025
12 checks passed
@baloobaloo deleted the baloo/release-5.x/jj-signed-commits branchSeptember 24, 2025 17:41
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` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgo-git%2fgo-git%2fv5/v5.16.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgo-git%2fgo-git%2fv5/v5.16.2/v5.16.3?slim=true)](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 [@&#8203;baloo](https://github.com/baloo) in [#&#8203;1644](go-git/go-git#1644)- build: raise timeouts for windows CI tests and disable CIFuzz \[5.x] by [@&#8203;baloo](https://github.com/baloo) in [#&#8203;1646](go-git/go-git#1646)- plumbing: support commits extra headers, support jujutsu signed commit \[5.x] by [@&#8203;baloo](https://github.com/baloo) in [#&#8203;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

Reviewers

@pjbgfpjbgfpjbgf approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@baloo@pjbgf

[8]ページ先頭

©2009-2025 Movatter.jp