git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Patrik Weiskircher via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: apenwarr@gmail.com, Junio C Hamano <gitster@pobox.com>,
	Patrik Weiskircher <patrik@pspdfkit.com>
Subject: [PATCH 0/2] contrib/subtree: Add -S/-gpg-sign
Date: Mon, 02 Jun 2025 16:40:37 +0000	[thread overview]
Message-ID: <pull.1928.git.1748882439.gitgitgadget@gmail.com> (raw)

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

             reply	other threads:[~2025-06-02 16:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02 16:40 Patrik Weiskircher via GitGitGadget [this message]
2025-06-02 16:40 ` [PATCH 1/2] contrib/subtree: parse using --stuck-long Patrik Weiskircher via GitGitGadget
2025-06-03 20:42   ` D. Ben Knoble
2025-06-04 13:56     ` Patrik Weiskircher
2025-06-04 14:09       ` Kristoffer Haugsbakk
2025-06-04 15:41         ` Junio C Hamano
2025-06-04 15:43           ` Patrik Weiskircher
2025-06-02 16:40 ` [PATCH 2/2] contrib/subtree: add -S/--gpg-sign Patrik Weiskircher via GitGitGadget
2025-06-04 14:16 ` [PATCH v2 0/2] contrib/subtree: Add -S/-gpg-sign Patrik Weiskircher via GitGitGadget
2025-06-04 14:16   ` [PATCH v2 1/2] contrib/subtree: parse using --stuck-long Patrik Weiskircher via GitGitGadget
2025-06-04 14:16   ` [PATCH v2 2/2] contrib/subtree: add -S/--gpg-sign Patrik Weiskircher via GitGitGadget
2025-06-04 16:33   ` [PATCH v2 0/2] contrib/subtree: Add -S/-gpg-sign Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.1928.git.1748882439.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=patrik@pspdfkit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).