Subject: Re: [PATCH 2/2] fast-import: add '--signed-commits=<mode>' option

From: Junio C Hamano <[email-masked]>
Date: Wed, 10 Sep 2025 11:21:11 -0700

Christian Couder <[email-masked]> writes:

> A '--signed-commits=<mode>' option is already available when using
> `git fast-export` to decide what should be done at export time about
> commit signatures. At import time though, there is no option, or
> other way, in `git fast-import` to decide about commit signatures.
>
> To remediate that, let's add a '--signed-commits=<mode>' option to
> `git fast-import` too.
>
> For now the supported <mode>s are the same as those supported by
> `git fast-export`.
>
> Signed-off-by: Christian Couder <[email-masked]>
> ---
>  Documentation/git-fast-import.adoc |   5 ++
>  builtin/fast-import.c              |  55 +++++++++++----
>  t/meson.build                      |   1 +
>  t/t9305-fast-import-signatures.sh  | 108 +++++++++++++++++++++++++++++
>  4 files changed, 157 insertions(+), 12 deletions(-)
>  create mode 100755 t/t9305-fast-import-signatures.sh
>
> diff --git a/Documentation/git-fast-import.adoc b/Documentation/git-fast-import.adoc
> index 3144ffcdb6..90f242d058 100644
> --- a/Documentation/git-fast-import.adoc
> +++ b/Documentation/git-fast-import.adoc
> @@ -66,6 +66,11 @@ OPTIONS
>  	remote-helpers that use the `import` capability, as they are
>  	already trusted to run their own code.
>  
> +--signed-commits=(verbatim|warn-verbatim|warn-strip|strip|abort)::
> +	Specify how to handle signed commits.  Behaves in the same way
> +	as the same option in linkgit:git-fast-export[1], except that
> +	default is 'verbatim' (instead of 'abort').

I forgot one thing.  Earlier in 1/2 we saw

    The definition of 'enum sign_mode' as well as its parsing code are in
    "builtin/fast-export.c". This was fine because `git fast-export` was the
    only command with '--signed-tags=<mode>' or '--signed-commits=<mode>'
    options.

    In a following commit, we are going to add such options to `git
    fast-import`, which will be simpler, easier and cleaner if we can reuse
    the 'enum sign_mode' defintion and parsing code.

and I was implicitly expecting that both commits and tags would be
supported on the import side, but this only deals with the commits?

Is patch [3/2] missing from the archive?

Thanks.