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

Re: [PATCH 5/5] fast-import: add '--signed-tags=<mode>' option

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 8, 2025, 11:53 UTC
Message-ID
<aOZQwBZo90Gjn85m@pks.im>
In-Reply-To
<CAP8UFD0E+5K1yL1rj5jXVMX9hQyoA_sH0f=fUP6aCj==TtfAbQ@mail.gmail.com>
On Wed, Oct 08, 2025 at 12:50:53PM +0200, Christian Couder wrote:
Show 24 quoted lines
> On Wed, Oct 8, 2025 at 11:21 AM Patrick Steinhardt <ps@pks.im> wrote:
> >
> > On Tue, Oct 07, 2025 at 02:29:58PM +0200, Christian Couder wrote:
> > > diff --git a/Documentation/git-fast-import.adoc b/Documentation/git-fast-import.adoc
> > > index 85ed7a7270..b74179a6c8 100644
> > > --- a/Documentation/git-fast-import.adoc
> > > +++ b/Documentation/git-fast-import.adoc
> > > @@ -66,6 +66,11 @@ fast-import stream! This option is enabled automatically for
> > >  remote-helpers that use the `import` capability, as they are
> > >  already trusted to run their own code.
> > >
> > > +--signed-tags=(verbatim|warn-verbatim|warn-strip|strip|abort)::
> > > +     Specify how to handle signed tags.  Behaves in the same way
> > > +     as the same option in linkgit:git-fast-export[1], except that
> > > +     default is 'verbatim' (instead of 'abort').
> > > +
> >
> > Nit: I would've ordered this after "--signed-commits", mostly so that
> > these two are ordered alphabetically.
> 
> In the fast-export doc --signed-tags is before --signed-commits. Also
> in the previous patch series Junio mentioned that historically signed
> tags came before signed commits. And the other options are not sorted
> alphabetically.
Okay, makes sense.
Show 22 quoted lines
> > > +     case SIGN_STRIP:
> > > +             /* Truncate the buffer to remove the signature */
> > > +             strbuf_setlen(msg, sig_offset);
> > > +             break;
> >
> > I'm not familiar with the signature format, so it's probably a dumb
> > question: does the signature always extend until the end of the tag
> > message? Doesn't the tag message come after it?
> 
> Users can add anything in a tag message, including signatures created
> however they want and copy-pasted there, followed by whatever content
> they want. I don't think we need to take care of those signatures,
> except perhaps to warn in our docs that Git could mistake them with
> the one Git creates.
> 
> When Git itself signs a tag, it appends the signature to the tag
> message. See do_sign() in "builtin/tag.c" for more details. It looks
> like 2 signatures can be created in "compat" mode, but the compat
> signature is added into an object header, not appended to the tag
> message.
> 
> So I think this is the right thing to do and relatively safe.
Okay, thanks for clarifying.
Patrick
Previous: Christian CouderNext: Christian Couder
Message 24 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.