git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Christian Couder <christian.couder@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Elijah Newren <newren@gmail.com>, Jeff King <peff@peff.net>,
	"brian m . carlson" <sandals@crustytoothpaste.net>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Christian Couder <chriscool@tuxfamily.org>
Subject: Re: [PATCH 5/5] fast-import: add '--signed-tags=<mode>' option
Date: Wed, 8 Oct 2025 13:53:36 +0200	[thread overview]
Message-ID: <aOZQwBZo90Gjn85m@pks.im> (raw)
In-Reply-To: <CAP8UFD0E+5K1yL1rj5jXVMX9hQyoA_sH0f=fUP6aCj==TtfAbQ@mail.gmail.com>

On Wed, Oct 08, 2025 at 12:50:53PM +0200, Christian Couder wrote:
> 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.

> > > +     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

  reply	other threads:[~2025-10-08 11:53 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-07 12:29 [PATCH 0/5] fast-import: start controlling how tag signatures are handled Christian Couder
2025-10-07 12:29 ` [PATCH 1/5] doc: git-tag: stop focussing on GPG signed tags Christian Couder
2025-10-08  7:14   ` Patrick Steinhardt
2025-10-08  9:52     ` Christian Couder
2025-10-08 11:48       ` Patrick Steinhardt
2025-10-07 12:29 ` [PATCH 2/5] lib-gpg: allow tests with the GPGSM prereq first Christian Couder
2025-10-08  7:14   ` Patrick Steinhardt
2025-10-08  9:42     ` Christian Couder
2025-10-09  1:29       ` Collin Funk
2025-10-09  2:37         ` Todd Zullinger
2025-10-09 12:29           ` Christian Couder
2025-10-09 18:18           ` Junio C Hamano
2025-10-09 12:30         ` Christian Couder
2025-10-07 12:29 ` [PATCH 3/5] t9350: properly count annotated tags Christian Couder
2025-10-08  7:14   ` Patrick Steinhardt
2025-10-08 10:00     ` Christian Couder
2025-10-07 12:29 ` [PATCH 4/5] fast-export: handle all kinds of tag signatures Christian Couder
2025-10-08  7:14   ` Patrick Steinhardt
2025-10-08 10:02     ` Christian Couder
2025-10-09 12:33     ` Christian Couder
2025-10-07 12:29 ` [PATCH 5/5] fast-import: add '--signed-tags=<mode>' option Christian Couder
2025-10-08  7:14   ` Patrick Steinhardt
2025-10-08 10:50     ` Christian Couder
2025-10-08 11:53       ` Patrick Steinhardt [this message]
2025-10-09 12:24 ` [PATCH v2 0/5] fast-import: start controlling how tag signatures are handled Christian Couder
2025-10-09 12:24   ` [PATCH v2 1/5] doc: git-tag: stop focusing on GPG signed tags Christian Couder
2025-10-10  1:19     ` Junio C Hamano
2025-10-10  7:06       ` Christian Couder
2025-10-09 12:24   ` [PATCH v2 2/5] lib-gpg: allow tests with GPGSM or GPGSSH prereq first Christian Couder
2025-10-10  6:49     ` Patrick Steinhardt
2025-10-10 14:09       ` Todd Zullinger
2025-10-10 16:22         ` Junio C Hamano
2025-10-11  2:14           ` Todd Zullinger
2025-10-12  0:15             ` Junio C Hamano
2025-10-09 12:24   ` [PATCH v2 3/5] t9350: properly count annotated tags Christian Couder
2025-10-09 12:24   ` [PATCH v2 4/5] fast-export: handle all kinds of tag signatures Christian Couder
2025-10-09 12:24   ` [PATCH v2 5/5] fast-import: add '--signed-tags=<mode>' option Christian Couder
2025-10-09 21:35   ` [PATCH v2 0/5] fast-import: start controlling how tag signatures are handled Junio C Hamano
2025-10-13  8:48 ` [PATCH v3 " Christian Couder
2025-10-13  8:48   ` [PATCH v3 1/5] doc: git-tag: stop focusing on GPG signed tags Christian Couder
2025-10-24  2:03     ` Elijah Newren
2025-10-13  8:48   ` [PATCH v3 2/5] lib-gpg: allow tests with GPGSM or GPGSSH prereq first Christian Couder
2025-10-13  8:48   ` [PATCH v3 3/5] t9350: properly count annotated tags Christian Couder
2025-10-24  2:03     ` Elijah Newren
2025-10-13  8:48   ` [PATCH v3 4/5] fast-export: handle all kinds of tag signatures Christian Couder
2025-10-24  2:03     ` Elijah Newren
2025-10-13  8:48   ` [PATCH v3 5/5] fast-import: add '--signed-tags=<mode>' option Christian Couder
2025-10-24  2:03     ` Elijah Newren
2025-10-24  9:27       ` Christian Couder
2025-10-24 15:03       ` Junio C Hamano
2025-10-13  9:09   ` [PATCH v3 0/5] fast-import: start controlling how tag signatures are handled Christian Couder
2025-10-24  2:06     ` Elijah Newren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aOZQwBZo90Gjn85m@pks.im \
    --to=ps@pks.im \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=chriscool@tuxfamily.org \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.com \
    --cc=peff@peff.net \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).