From: Junio C Hamano <gitster@pobox.com>
To: Christian Couder <christian.couder@gmail.com>,
Luke Shumaker <lukeshu@datawire.io>
Cc: Elijah Newren <newren@gmail.com>,
git@vger.kernel.org, Patrick Steinhardt <ps@pks.im>,
Jeff King <peff@peff.net>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Christian Couder <chriscool@tuxfamily.org>
Subject: Re: [PATCH] fast-(import|export): improve on the signature algorithm name
Date: Wed, 28 May 2025 10:29:19 -0700 [thread overview]
Message-ID: <xmqq8qmgsky8.fsf@gitster.g> (raw)
In-Reply-To: <xmqqzfeyqdye.fsf@gitster.g> (Junio C. Hamano's message of "Tue, 27 May 2025 08:18:49 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Christian Couder <christian.couder@gmail.com> writes:
>
>> I agree that we should have at least said in big letters that the
>> improved support for signed commits in fast-export/import is very
>> experimental and very likely to change in the future.
>>
>> We could still do so. This could give us a bit of time and flexibility
>> until we agree on and implement something better and backward
>> compatible. (Hopefully the v2 will help us move forward.)
>
> OK, as the next release is approaching, perhaps we do a bit of
> documentation update to address that "we are experimenting" and
> nothing else, and leave the v2 updates for the next cycle?
---- >8 ----
Subject: [PATCH] fast-export: --signed-commits is experimental
As the design of signature handling is still being discussed, it is
likely that the data stream produced by the code in Git 2.50 would
have to be changed in such a way that is not backward compatible.
Mark the feature as experimental and discourge its use for now.
Also flip the default on the generation side to "strip"; users of
existing versions would not have passed --signed-commits=strip and
will be broken by this change if the default is made to abort, and
will be encouraged by the error message to produce data stream with
future breakage guarantees by passing --signed-commits option.
As we tone down the default behaviour, we no longer need the
FAST_EXPORT_SIGNED_COMMITS_NOABORT environment variable, which was
not discoverable enough.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Documentation/RelNotes/2.50.0.adoc | 4 +++-
Documentation/git-fast-export.adoc | 12 +++++-------
Documentation/git-fast-import.adoc | 3 +++
builtin/fast-export.c | 7 +------
t/t9350-fast-export.sh | 20 ++++----------------
5 files changed, 16 insertions(+), 30 deletions(-)
diff --git a/Documentation/RelNotes/2.50.0.adoc b/Documentation/RelNotes/2.50.0.adoc
index c6c34d1a1d..9a1cdf0dc0 100644
--- a/Documentation/RelNotes/2.50.0.adoc
+++ b/Documentation/RelNotes/2.50.0.adoc
@@ -100,7 +100,9 @@ Performance, Internal Implementation, Development Support etc.
* "git fsck" becomes more careful when checking the refs.
* "git fast-export | git fast-import" learns to deal with commit and
- tag objects with embedded signatures a bit better.
+ tag objects with embedded signatures a bit better. This is highly
+ experimental and the format of the data stream may change in the
+ future without compatibility guarantees.
* The code paths to check whether a refname X is available (by seeing
if another ref X/Y exists, etc.) have been optimized.
diff --git a/Documentation/git-fast-export.adoc b/Documentation/git-fast-export.adoc
index 413a527496..43bbb4f63c 100644
--- a/Documentation/git-fast-export.adoc
+++ b/Documentation/git-fast-export.adoc
@@ -46,14 +46,12 @@ resulting tag will have an invalid signature.
--signed-commits=(verbatim|warn-verbatim|warn-strip|strip|abort)::
Specify how to handle signed commits. Behaves exactly as
- '--signed-tags', but for commits. Default is 'abort'.
+ '--signed-tags', but for commits. Default is 'strip', which
+ is the same as how earlier versions of this command without
+ this option behaved.
+
-Earlier versions this command that did not have '--signed-commits'
-behaved as if '--signed-commits=strip'. As an escape hatch for users
-of tools that call 'git fast-export' but do not yet support
-'--signed-commits', you may set the environment variable
-'FAST_EXPORT_SIGNED_COMMITS_NOABORT=1' in order to change the default
-from 'abort' to 'warn-strip'.
+NOTE: This is highly experimental and the format of the data stream may
+change in the future without compatibility guarantees.
--tag-of-filtered-object=(abort|drop|rewrite)::
Specify how to handle tags whose tagged object is filtered out.
diff --git a/Documentation/git-fast-import.adoc b/Documentation/git-fast-import.adoc
index 7b107f5e8e..250d866652 100644
--- a/Documentation/git-fast-import.adoc
+++ b/Documentation/git-fast-import.adoc
@@ -523,6 +523,9 @@ that signs the commit data.
Here <alg> specifies which hashing algorithm is used for this
signature, either `sha1` or `sha256`.
+NOTE: This is highly experimental and the format of the data stream may
+change in the future without compatibility guarantees.
+
`encoding`
^^^^^^^^^^
The optional `encoding` command indicates the encoding of the commit
diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index 37c01d6c6f..fcf6b00d5f 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -39,7 +39,7 @@ enum sign_mode { SIGN_ABORT, SIGN_VERBATIM, SIGN_STRIP, SIGN_WARN_VERBATIM, SIGN
static int progress;
static enum sign_mode signed_tag_mode = SIGN_ABORT;
-static enum sign_mode signed_commit_mode = SIGN_ABORT;
+static enum sign_mode signed_commit_mode = SIGN_STRIP;
static enum tag_of_filtered_mode { TAG_FILTERING_ABORT, DROP, REWRITE } tag_of_filtered_mode = TAG_FILTERING_ABORT;
static enum reencode_mode { REENCODE_ABORT, REENCODE_YES, REENCODE_NO } reencode_mode = REENCODE_ABORT;
static int fake_missing_tagger;
@@ -1269,7 +1269,6 @@ int cmd_fast_export(int argc,
const char *prefix,
struct repository *repo UNUSED)
{
- const char *env_signed_commits_noabort;
struct rev_info revs;
struct commit *commit;
char *export_filename = NULL,
@@ -1327,10 +1326,6 @@ int cmd_fast_export(int argc,
if (argc == 1)
usage_with_options (fast_export_usage, options);
- env_signed_commits_noabort = getenv("FAST_EXPORT_SIGNED_COMMITS_NOABORT");
- if (env_signed_commits_noabort && *env_signed_commits_noabort)
- signed_commit_mode = SIGN_WARN_STRIP;
-
/* we handle encodings */
git_config(git_default_config, NULL);
diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh
index dda9e7c3e7..76619765fc 100755
--- a/t/t9350-fast-export.sh
+++ b/t/t9350-fast-export.sh
@@ -299,22 +299,10 @@ test_expect_success GPG 'set up signed commit' '
'
-test_expect_success GPG 'signed-commits default' '
-
- sane_unset FAST_EXPORT_SIGNED_COMMITS_NOABORT &&
- test_must_fail git fast-export --reencode=no commit-signing &&
-
- FAST_EXPORT_SIGNED_COMMITS_NOABORT=1 git fast-export --reencode=no commit-signing >output 2>err &&
- ! grep ^gpgsig output &&
- grep "^encoding ISO-8859-1" output &&
- test -s err &&
- sed "s/commit-signing/commit-strip-signing/" output | (
- cd new &&
- git fast-import &&
- STRIPPED=$(git rev-parse --verify refs/heads/commit-strip-signing) &&
- test $COMMIT_SIGNING != $STRIPPED
- )
-
+test_expect_success GPG 'signed-commits default is same as strip' '
+ git fast-export --reencode=no commit-signing >out1 2>err &&
+ git fast-export --reencode=no --signed-commits=strip commit-signing >out2 &&
+ test_cmp out1 out2
'
test_expect_success GPG 'signed-commits=abort' '
--
2.50.0-rc0-134-gb29a910c2a
next prev parent reply other threads:[~2025-05-28 17:29 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 20:39 [PATCH] fast-(import|export): improve on the signature algorithm name Christian Couder
2025-04-24 21:19 ` Junio C Hamano
2025-04-24 21:59 ` Elijah Newren
2025-04-24 22:58 ` Junio C Hamano
2025-05-26 10:35 ` Christian Couder
2025-05-27 15:18 ` Junio C Hamano
2025-05-28 17:29 ` Junio C Hamano [this message]
2025-05-28 20:06 ` Elijah Newren
2025-05-28 21:59 ` Junio C Hamano
2025-05-28 23:15 ` Elijah Newren
2025-05-29 3:14 ` Junio C Hamano
2025-06-02 15:56 ` Christian Couder
2025-06-02 15:56 ` Christian Couder
2025-06-02 16:20 ` Junio C Hamano
2025-05-26 10:34 ` Christian Couder
2025-04-24 21:41 ` Elijah Newren
2025-05-26 10:34 ` Christian Couder
2025-04-24 22:05 ` brian m. carlson
2025-05-26 10:35 ` Christian Couder
2025-04-24 23:25 ` Junio C Hamano
2025-05-26 10:33 ` [PATCH v2 0/6] extract algo information from signatures Christian Couder
2025-05-26 10:33 ` [PATCH v2 1/6] gpg-interface: simplify ssh fingerprint parsing Christian Couder
2025-05-26 10:33 ` [PATCH v2 2/6] gpg-interface: use left shift to define GPG_VERIFY_* Christian Couder
2025-05-26 10:33 ` [PATCH v2 3/6] doc/verify-commit: update and improve the whole doc Christian Couder
2025-05-26 10:33 ` [PATCH v2 4/6] gpg-interface: extract hash algorithm from signature status output Christian Couder
2025-05-26 10:33 ` [PATCH v2 5/6] gpg-interface: extract SSH key type " Christian Couder
2025-05-26 10:33 ` [PATCH v2 6/6] verify-commit: add a --summary flag Christian Couder
2025-05-26 16:03 ` [PATCH v2 0/6] extract algo information from signatures Elijah Newren
2025-06-19 13:38 ` Christian Couder
2025-06-02 22:17 ` brian m. carlson
2025-06-19 13:37 ` Christian Couder
2025-06-18 15:18 ` [PATCH v3] fast-(import|export): improve on commit signature output format Christian Couder
2025-06-19 13:36 ` [PATCH v4] " Christian Couder
2025-06-19 14:55 ` Junio C Hamano
2025-07-08 9:16 ` Christian Couder
2025-06-19 21:44 ` Elijah Newren
2025-06-20 16:12 ` Christian Couder
2025-06-20 19:20 ` Junio C Hamano
2025-07-08 9:16 ` Christian Couder
2025-06-26 19:11 ` Elijah Newren
2025-07-08 9:16 ` Christian Couder
2025-07-07 22:58 ` Junio C Hamano
2025-07-08 3:35 ` Christian Couder
2025-07-08 5:03 ` Junio C Hamano
2025-07-08 6:38 ` Patrick Steinhardt
2025-07-08 11:08 ` Christian Couder
2025-07-08 16:38 ` Junio C Hamano
2025-07-09 0:19 ` Christian Couder
2025-07-09 15:35 ` Junio C Hamano
2025-07-10 8:25 ` Patrick Steinhardt
2025-07-10 15:29 ` Christian Couder
2025-07-10 15:33 ` Junio C Hamano
2025-07-08 10:17 ` Christian Couder
2025-07-08 9:17 ` [PATCH v5] " Christian Couder
2025-07-08 21:58 ` Junio C Hamano
2025-07-08 23:08 ` Elijah Newren
2025-07-09 0:03 ` Junio C Hamano
2025-07-09 0:10 ` Elijah Newren
2025-07-09 10:18 ` Christian Couder
2025-07-09 10:15 ` Christian Couder
2025-07-09 14:12 ` [PATCH v6] " Christian Couder
2025-07-09 23:14 ` Junio C Hamano
2025-07-14 21:07 ` Elijah Newren
2025-07-14 21:23 ` Junio C Hamano
2025-07-25 16:11 ` Christian Couder
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=xmqq8qmgsky8.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=chriscool@tuxfamily.org \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=lukeshu@datawire.io \
--cc=newren@gmail.com \
--cc=peff@peff.net \
--cc=ps@pks.im \
/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).