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

[PATCH 0/3] fast-import: add 'strip-if-invalid' mode to --signed-commits=<mode>

From
Christian Couder <christian.couder@gmail.com>
Date
Nov 5, 2025, 06:19 UTC
Message-ID
<20251105061918.3688870-1-christian.couder@gmail.com>

The `--signed-commits=<mode>` option in `git fast-import` allows users to decide what should be done when commits with signatures are imported.

For tools like `git filter-repo`, it would be useful to be able to strip signatures when they are invalid, so let's add a new 'strip-if-invalid' mode for that purpose.

Maybe this new mode should become the default mode, but this would be breaking backward compatibility, and perhaps this could be decided after other new modes that might be even better default modes have been added. So we leave that for future work.

This 'strip-if-invalid' mode should also be added to `--signed-tags=<mode>`, but we leave that for future work too.

CI tests ========

They have all passed, see:
https://github.com/chriscool/git/actions/runs/19091593841/job/54543228129
Christian Couder (3):
  fast-import: refactor finalize_commit_buffer()
  commit: refactor verify_commit_buffer()
  fast-import: add 'strip-if-invalid' mode to --signed-commits=<mode>
 Documentation/git-fast-import.adoc |  28 ++++---
 builtin/fast-export.c              |  46 ++++++++---
 builtin/fast-import.c              |  74 +++++++++++++++---
 commit.c                           |  17 ++++-
 commit.h                           |   7 ++
 gpg-interface.c                    |   2 +
 gpg-interface.h                    |   1 +
 t/t9305-fast-import-signatures.sh  | 118 ++++++++++++++++++++++++++++-
 8 files changed, 260 insertions(+), 33 deletions(-)
-- 
2.52.0.rc0.3.gf264cd25e5
Next: Christian Couder
Message 1 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.