From: Patrick Steinhardt <ps@pks.im>
To: Toon Claes <toon@iotcl.com>
Cc: git@vger.kernel.org, "brian m. carlson" <sandals@crustytoothpaste.net>
Subject: Re: [PATCH v2] setup: use SHA-256 when experimental features are enabled
Date: Fri, 4 Dec 2026 15:06:46 +0100 [thread overview]
Message-ID: <axLI9iGAQMBToMld@pks.im> (raw)
In-Reply-To: <20261203-toon-init-experimental-sha256-v2-1-7b9490fbd397@iotcl.com>
On Thu, Dec 03, 2026 at 05:11:02PM +0100, Toon Claes wrote:
> diff --git a/t/t0001-init.sh b/t/t0001-init.sh
> index 58271c8fac..38f92a3b7c 100755
> --- a/t/t0001-init.sh
> +++ b/t/t0001-init.sh
> @@ -586,6 +586,72 @@ test_expect_success 'init warns about invalid init.defaultObjectFormat' '
[snip]
> +test_expect_success 're-init with feature.experimental=true keeps sha1' '
> + test_when_finished "rm -rf repo" &&
> + git init --object-format=sha1 repo &&
> + test_commit -C repo initial &&
> + test_config_global feature.experimental true &&
> + (
> + sane_unset GIT_DEFAULT_HASH &&
> + git init repo
> + ) &&
> + echo sha1 >expect &&
> + git -C repo rev-parse --show-object-format >actual &&
> + test_cmp expect actual &&
> + git -C repo fsck
> +'
> +
> +test_expect_success 'clone of sha1 repository with feature.experimental=true' '
> + test_when_finished "rm -rf src dst" &&
> + git init --object-format=sha1 src &&
> + test_commit -C src initial &&
> + test_config_global feature.experimental true &&
> + (
> + sane_unset GIT_DEFAULT_HASH &&
> + git clone --no-local src dst
> + ) &&
> + echo sha1 >expect &&
> + git -C dst rev-parse --show-object-format >actual &&
> + test_cmp expect actual &&
> + git -C src rev-parse HEAD >expect &&
> + git -C dst rev-parse HEAD >actual &&
> + test_cmp expect actual
> +'
Okay, these are the two new tests. We now verify that reinitialization
works as expected and doesn't just change the object format, and we do
the same for cloning a repository. Good.
Overall I'm happy with this version, thanks!
Patrick
prev parent reply other threads:[~2026-12-04 14:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 6:47 [PATCH] setup: use SHA-256 when experimental features are enabled Toon Claes
2026-12-01 7:59 ` Patrick Steinhardt
2026-12-01 8:04 ` Patrick Steinhardt
2026-12-02 7:02 ` Toon Claes
2026-12-01 23:19 ` brian m. carlson
2026-12-03 16:11 ` [PATCH v2] " Toon Claes
2026-12-04 14:06 ` Patrick Steinhardt [this message]
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=axLI9iGAQMBToMld@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=sandals@crustytoothpaste.net \
--cc=toon@iotcl.com \
/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