git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] contrib/subtree: Add -S/-gpg-sign

From
PGPatrik Weiskircher via GitGitGadget <gitgitgadget@gmail.com>
Date
Jun 2, 2025, 16:40 UTC
Message-ID
<pull.1928.git.1748882439.gitgitgadget@gmail.com>

This patch adds support for the -S/--gpg-sign option to the git subtree command.

Currently, git subtree creates squash and merge commits without applying GPG signatures, even when commit signing is configured via commit.gpgSign. This causes issues in repositories that require signed commits for policy reasons.

The implementation ensures that -S/--gpg-sign behaves consistently with other Git commands, passing the flag through to git commit-tree and git merge where appropriate.

This change improves compatibility with workflows and repositories that enforce signed commits.

Changes have been made to this patch according to a discussion with Junio C Hamano gitster@pobox.com on my previous patch attempt.

Patrik Weiskircher (2):
  contrib/subtree: parse using --stuck-long
  contrib/subtree: add -S/--gpg-sign
 contrib/subtree/git-subtree.adoc   |  19 +++--
 contrib/subtree/git-subtree.sh     |  66 ++++++++---------
 contrib/subtree/t/t7900-subtree.sh | 113 +++++++++++++++++++++++++++++
 3 files changed, 158 insertions(+), 40 deletions(-)
base-commit: 7014b55638da979331baf8dc31c4e1d697cf2d67
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1928%2Fpweiskircher%2Fsubtree-sign-the-second-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1928/pweiskircher/subtree-sign-the-second-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1928
-- 
gitgitgadget
Next: Patrik Weiskircher via GitGitGadget
Message 1 of 12 in “contrib/subtree: Add -S/-gpg-sign”
  1. 0/2 contrib/subtree: Add -S/-gpg-signPatrik Weiskircher via GitGitGadget, Jun 2, 2025
  2. 1/2 contrib/subtree: parse using --stuck-longPatrik Weiskircher via GitGitGadget, Jun 2, 2025
  3. D. Ben KnobleJun 3, 2025
  4. Patrik WeiskircherJun 4, 2025
  5. Kristoffer HaugsbakkJun 4, 2025
  6. Junio C HamanoJun 4, 2025
  7. Patrik WeiskircherJun 4, 2025
  8. 2/2 contrib/subtree: add -S/--gpg-signPatrik Weiskircher via GitGitGadget, Jun 2, 2025
  9. 0/2 contrib/subtree: Add -S/-gpg-signPatrik Weiskircher via GitGitGadget, Jun 4, 2025
  10. 1/2 contrib/subtree: parse using --stuck-longPatrik Weiskircher via GitGitGadget, Jun 4, 2025
  11. 2/2 contrib/subtree: add -S/--gpg-signPatrik Weiskircher via GitGitGadget, Jun 4, 2025
  12. Junio C HamanoJun 4, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.