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

[PATCH 0/5] fast-import: start controlling how tag signatures are handled

From
Christian Couder <christian.couder@gmail.com>
Date
Oct 7, 2025, 12:29 UTC
Message-ID
<20251007122958.1089680-1-christian.couder@gmail.com>

Introduction ------------

Tools like `git-filter-repo` should be able to control how tag signatures are handled when regenerating repository content after it has been filtered. For this purpose, they need a way for `git fast-import` to control how tag signatures are handled.

A previous series [1] added a '--signed-commits=<mode>' option to `git fast-import` to control how commit signatures are handled, so this is adding a similar '--signed-tags=<mode>' for tag signatures.

For now this new option behaves in a very similar way as the option with the same name that already exists in `git fast-export`. Especially it supports exactly the same <mode>s and the same aliases for these modes. For example "ignore" is a synonym for "verbatim".

This way, both `git fast-export` and `git fast-import` have both a '--signed-tags=<mode>' and a '--signed-commits=<mode>' supporting the same <mode>s.

In the future I want to implement new <mode>s like "strip-if-invalid", "re-sign", "re-sign-if-invalid" in `git fast-import` for both tag and commit signatures. These might be a bit more complex, so for now I prefer to start with the simple modes.

[1] https://lore.kernel.org/git/20250917181427.3193500-1-christian.couder@gmail.com/

Note about the different patches --------------------------------

Patch 1/5 (doc: git-tag: stop focussing on GPG signed tags) is a documentation update for `git tag`. It could go in a separate series or be dropped altogether, but while working on this I thought that it would be a good thing to do, as the doc is quite outdated.

Patches 2/5, 3/5 and 4/5 are preparatory patches for the main one which is patch 5/5 (fast-import: add '--signed-tags=<mode>' option).

I wanted '--signed-tags=<mode>' to work for all kinds of signature in tags (OpenPGP, X.509 and SSH) but soon realized that the '--signed-tags=<mode>' option of `git fast-export` worked only for OpenPGP signatures, so I fixed that issue in patch 4/5 (fast-export: handle all kinds of tag signatures).

While working on the tests in patch 4/5, I found a few things to improve that could belong to other patches so that's how I came up with patches 2/5 and 3/5.

CI tests: ---------

They have all passed except one on Windows where "t8020-last-modified.sh" failed. I doubt it's related though. See:

https://github.com/chriscool/git/actions/runs/18311274807/job/52140205441
Christian Couder (5):
  doc: git-tag: stop focussing on GPG signed tags
  lib-gpg: allow tests with the GPGSM prereq first
  t9350: properly count annotated tags
  fast-export: handle all kinds of tag signatures
  fast-import: add '--signed-tags=<mode>' option
 Documentation/git-fast-import.adoc |  5 ++
 Documentation/git-tag.adoc         | 52 ++++++++++++-------
 builtin/fast-export.c              |  7 ++-
 builtin/fast-import.c              | 43 ++++++++++++++++
 t/lib-gpg.sh                       |  2 +-
 t/meson.build                      |  1 +
 t/t9306-fast-import-signed-tags.sh | 80 ++++++++++++++++++++++++++++++
 t/t9350-fast-export.sh             | 60 ++++++++++++++++++++--
 8 files changed, 224 insertions(+), 26 deletions(-)
 create mode 100755 t/t9306-fast-import-signed-tags.sh
-- 
2.51.0.438.g6987fc0bae
Next: Christian Couder
Message 1 of 52 in “fast-import: start controlling how tag signatures are handled”
  1. 0/5 fast-import: start controlling how tag signatures are handledChristian Couder, Oct 7, 2025
  2. 1/5 doc: git-tag: stop focussing on GPG signed tagsChristian Couder, Oct 7, 2025
  3. Patrick SteinhardtOct 8, 2025
  4. Christian CouderOct 8, 2025
  5. Patrick SteinhardtOct 8, 2025
  6. 2/5 lib-gpg: allow tests with the GPGSM prereq firstChristian Couder, Oct 7, 2025
  7. Patrick SteinhardtOct 8, 2025
  8. Christian CouderOct 8, 2025
  9. Collin FunkOct 9, 2025
  10. Todd ZullingerOct 9, 2025
  11. Christian CouderOct 9, 2025
  12. Junio C HamanoOct 9, 2025
  13. Christian CouderOct 9, 2025
  14. 3/5 t9350: properly count annotated tagsChristian Couder, Oct 7, 2025
  15. Patrick SteinhardtOct 8, 2025
  16. Christian CouderOct 8, 2025
  17. 4/5 fast-export: handle all kinds of tag signaturesChristian Couder, Oct 7, 2025
  18. Patrick SteinhardtOct 8, 2025
  19. Christian CouderOct 8, 2025
  20. Christian CouderOct 9, 2025
  21. 5/5 fast-import: add '--signed-tags=<mode>' optionChristian Couder, Oct 7, 2025
  22. Patrick SteinhardtOct 8, 2025
  23. Christian CouderOct 8, 2025
  24. Patrick SteinhardtOct 8, 2025
  25. 0/5 fast-import: start controlling how tag signatures are handledChristian Couder, Oct 9, 2025
  26. 1/5 doc: git-tag: stop focusing on GPG signed tagsChristian Couder, Oct 9, 2025
  27. Junio C HamanoOct 10, 2025
  28. Christian CouderOct 10, 2025
  29. 2/5 lib-gpg: allow tests with GPGSM or GPGSSH prereq firstChristian Couder, Oct 9, 2025
  30. Patrick SteinhardtOct 10, 2025
  31. Todd ZullingerOct 10, 2025
  32. Junio C HamanoOct 10, 2025
  33. Todd ZullingerOct 11, 2025
  34. Junio C HamanoOct 12, 2025
  35. 3/5 t9350: properly count annotated tagsChristian Couder, Oct 9, 2025
  36. 4/5 fast-export: handle all kinds of tag signaturesChristian Couder, Oct 9, 2025
  37. 5/5 fast-import: add '--signed-tags=<mode>' optionChristian Couder, Oct 9, 2025
  38. Junio C HamanoOct 9, 2025
  39. 0/5 fast-import: start controlling how tag signatures are handledChristian Couder, Oct 13, 2025
  40. 1/5 doc: git-tag: stop focusing on GPG signed tagsChristian Couder, Oct 13, 2025
  41. Elijah NewrenOct 24, 2025
  42. 2/5 lib-gpg: allow tests with GPGSM or GPGSSH prereq firstChristian Couder, Oct 13, 2025
  43. 3/5 t9350: properly count annotated tagsChristian Couder, Oct 13, 2025
  44. Elijah NewrenOct 24, 2025
  45. 4/5 fast-export: handle all kinds of tag signaturesChristian Couder, Oct 13, 2025
  46. Elijah NewrenOct 24, 2025
  47. 5/5 fast-import: add '--signed-tags=<mode>' optionChristian Couder, Oct 13, 2025
  48. Elijah NewrenOct 24, 2025
  49. Christian CouderOct 24, 2025
  50. Junio C HamanoOct 24, 2025
  51. Christian CouderOct 13, 2025
  52. Elijah NewrenOct 24, 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.