From: Patrick Steinhardt Date: Fri, 13 Mar 2026 06:31:53 GMT Subject: Re: [PATCH v6 3/3] fast-import: add mode to sign commits with invalid signatures Message-ID: In-Reply-To: <20260313013938.2742124-4-jltobler@gmail.com> On Thu, Mar 12, 2026 at 08:39:38PM -0500, Justin Tobler wrote: > diff --git a/builtin/fast-import.c b/builtin/fast-import.c > index b8a7757cfd..935e688e33 100644 > --- a/builtin/fast-import.c > +++ b/builtin/fast-import.c > @@ -2865,6 +2855,67 @@ static void handle_strip_if_invalid(struct strbuf *new_data, > else > warning(_("stripping invalid signature for commit\n" > " allegedly by %s"), signer); > + break; > + case SIGN_SIGN_IF_INVALID: > + if (subject_len > 100) > + warning(_("replacing invalid signature for commit '%.100s...'\n" > + " allegedly by %s"), subject, signer); > + else if (subject_len > 0) > + warning(_("replacing invalid signature for commit '%.*s'\n" > + " allegedly by %s"), subject_len, subject, signer); > + else > + warning(_("replacing invalid signature for commit\n" > + " allegedly by %s"), signer); > + break; > + default: > + BUG("unsupported signing mode"); > + } > +} The wording of those warnings also reads better than before now. Patrick