[PATCH 0/4] fast-import: extend signed object handling modes
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Mar 24, 2026, 21:55 UTC
- Message-ID
- <20260324215513.764739-1-jltobler@gmail.com>
Greetings,
The '--signed-{commits,tags}=<mode>' options for git-fast-import(1) allow users to configure how signed objects should be handled at time of import. With c20f112e51 (fast-import: add 'strip-if-invalid' mode to --signed-commits=<mode>, 2025-11-17) and ee66c793f8 (fast-import: add mode to sign commits with invalid signatures, 2026-03-12), the 'strip-if-invalid' and 'sign-if-invalid' modes were added for the '--signed-commits' option only.
This series extends '--signed-commits' by adding an 'abort-if-invalid' mode which aborts the entire import operation when a commit signature fails verification. Additionally, the '--signed-tags' option is brought into parity with '--signed-commits' by supporting equivalent, 'strip-if-invalid', 'sign-if-invalid', and 'abort-if-invalid' modes.
This series is built on top of 1080981ddb (The 19th batch, 2026-03-23) with ee66c793f8 (fast-import: add mode to sign commits with invalid signatures, 2026-03-12) merged into it.
Thanks, -Justin
Justin Tobler (4): fast-import: add 'abort-if-invalid' mode to '--signed-commits=<mode>' fast-import: add 'strip-if-invalid' mode to '--signed-tags=<mode>' fast-import: add 'sign-if-invalid' mode to '--signed-tags=<mode>' fast-import: add 'abort-if-invalid' mode to '--signed-tags=<mode>'
Documentation/git-fast-import.adoc | 9 ++- builtin/fast-export.c | 6 ++ builtin/fast-import.c | 71 ++++++++++++++--- gpg-interface.c | 2 + gpg-interface.h | 1 + t/t9305-fast-import-signatures.sh | 10 ++- t/t9306-fast-import-signed-tags.sh | 118 +++++++++++++++++++++++++++++ 7 files changed, 201 insertions(+), 16 deletions(-)
-- 2.53.0.381.g628a66ccf6