Re: [PATCH 0/3] fast-import: add 'strip-if-invalid' mode to --signed-commits=<mode>
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 12, 2025, 16:51 UTC
- Message-ID
- <xmqqqzu3ry7w.fsf@gitster.g>
- In-Reply-To
- <CAP8UFD1YqadtkYriePJKUBjzhXAyYjNEk-9rj55ZxbGLRAOd2g@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 14 quoted lines
>> Even if you are not changing a single bit in the import, >> some of your early commits' signatures do not "validate" and may >> need to be stripped, and after that happens, wouldn't signatures of >> all later commits become unusable (i.e, you may be able to verify >> that the signature on the original commit object may still be valid, >> but because the commit has to become a child of a rewritten commit, >> in the resulting history the signature would no longer match)? > > Yes, I agree it could be an optimization to consider all the > subsequent signatures invalid after one of them is invalid, but it > would require making sure that the commit history that `git > fast-import` receives is completely linear or that we properly track > commit history when it's not not linear. I think it's better to start > with a relatively simpler implementation like this one though.
Note that I wasn't suggesting any optimization.
I was saying that the cascading effect would mean strip-if-invalid may have to strip all the later commits of their signatures anyway, which makes us question the usefulness of the feature.
The other message from Elijah made it clear what the piece this series implements fits in a bigger picture, so I actually am OK as long as the overall use case fits what he described in that message.
Thanks.