Re: [PATCH v3 0/3] fast-import: add mode to re-sign invalid commit signatures
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Mar 10, 2026, 21:06 UTC
- Message-ID
- <abCFKEHxu7OZr9bm@denethor>
- In-Reply-To
- <xmqqv7f3s93l.fsf@gitster.g>
On 26/03/10 01:49PM, Junio C Hamano wrote:
Show 17 quoted lines
> Justin Tobler <jltobler@gmail.com> writes: > > > With c20f112e51 (fast-import: add 'strip-if-invalid' mode to > > --signed-commits=<mode>, 2025-11-17), it became possible to remove > > invalid signatures from commits via git-fast-import(1) while maintaining > > valid commit signatures. Building upon this functionality, a user may > > want to re-sign these invalid commit signatures. This series introduces > > the `re-sign-if-invalid` mode to do so accordingly. > > I know that this "re-sign" used to be "resign", and the update is > indeed a replacement, but I wonder if we can just say "sign"? > > When we see a signature on an object we are rewriting, we either > "strip" it, or we "sign" it (afresh). It is not like we are > retaining the old signature, and signing on top of it. We are > discarding the old one so there is no difference from signing the > object that never had a signature, no?
From my perspective, "re-sign" implies that the signature was previously signed, but we are now going to sign it again. Indeed, the resulting commit signing is functionally the same as if the object never had a previous signature though. Also, "if-invalid" already implies that the object is signed, but its signature is invalid. So it could be argued that "re-sign" is already redundant.
Ultimately, I don't feel super strongly, but I can send another version that changes this option to "sign-if-invalid". It's probably a bit simpler this way too. I guess the enum value would need to be changed to "SIGN_SIGN_IF_INVALID"? Or maybe just "SIGN_IF_INVALID"?
Thanks, -Justin