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>
Junio C Hamano committedMay 28, 2025 at 10:29 UTC0b4c6baa70033a221fdac2211548a9a6f78d3e42
5 files changed+16-30
Documentation/RelNotes/2.50.0.adoc
+3-1
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.
Documentation/git-fast-export.adoc
+5-7
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.
Documentation/git-fast-import.adoc
+3
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