git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Christian CouderNext: Christian Couder
Message 12 of 20 in “fast-import: add 'strip-if-invalid' mode to --signed-commits=<mode>”
  1. 0/3 fast-import: add 'strip-if-invalid' mode to --signed-commits=<mode>Christian Couder, Nov 5, 2025
  2. 1/3 fast-import: refactor finalize_commit_buffer()Christian Couder, Nov 5, 2025
  3. 2/3 commit: refactor verify_commit_buffer()Christian Couder, Nov 5, 2025
  4. 3/3 fast-import: add 'strip-if-invalid' mode to --signed-commits=<mode>Christian Couder, Nov 5, 2025
  5. Junio C HamanoNov 8, 2025
  6. Christian CouderNov 12, 2025
  7. Junio C HamanoNov 12, 2025
  8. Junio C HamanoNov 5, 2025
  9. Elijah NewrenNov 8, 2025
  10. Christian CouderNov 12, 2025
  11. Christian CouderNov 12, 2025
  12. Junio C HamanoNov 12, 2025
  13. 0/3 fast-import: add 'strip-if-invalid' mode to --signed-commits=<mode>Christian Couder, Nov 17, 2025
  14. 1/3 fast-import: refactor finalize_commit_buffer()Christian Couder, Nov 17, 2025
  15. 2/3 commit: refactor verify_commit_buffer()Christian Couder, Nov 17, 2025
  16. 3/3 fast-import: add 'strip-if-invalid' mode to --signed-commits=<mode>Christian Couder, Nov 17, 2025
  17. Elijah NewrenNov 17, 2025
  18. Christian CouderNov 18, 2025
  19. Junio C HamanoNov 18, 2025
  20. Elijah NewrenNov 18, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.