]> Kevux Git Server - rit/commit
fast-export: check for unsupported signing modes earlier
authorJustin Tobler <jltobler@gmail.com>
Thu, 26 Mar 2026 19:14:10 +0000 (14:14 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 Mar 2026 19:42:57 +0000 (12:42 -0700)
commit6d35cc472e24394edb21a9b4d0abe25f5b2a91f2
treedde34a942536cf58c8b8c4eb44b7b6bc1c59e281
parentce74208c2fa13943fffa58f168ac27a76d0eb789
fast-export: check for unsupported signing modes earlier

The '--signed-{commits,tags}' options for git-fast-export(1) support
only a subset of the modes accepted by git-fast-import(1). Unsupported
modes such as 'strip-if-invalid' and 'sign-if-invalid' are accepted
during option parsing, but cause the command to die later when a signed
object is encountered.

Instead, reject unsupported signing modes immediately after parsing the
option. This treats them the same as other unknown modes and avoids
deferring the error until object processing. This also removes
duplicated checks in commit/tag handling code.

Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fast-export.c