Re: [PATCH v3] builtin/clone: avoid failure with GIT_DEFAULT_HASH
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 21, 2020, 04:27 UTC
- Message-ID
- <xmqq4knrhhzx.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20200920223541.1299038-1-sandals@crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 8 quoted lines
> +test_expect_success 'clone with GIT_DEFAULT_HASH' ' > + ( > + sane_unset GIT_DEFAULT_HASH && > + git init --object-format=sha1 test-sha1 && > + git init --object-format=sha256 test-sha256 > + ) && > + test_commit -C test-sha1 foo && > + test_commit -C test-sha256 foo &&
Unfortunately, the 'foo' commit is created in test-sha1, but the next step to create 'foo' in test-sha256 fails with
fatal: unknown repository extensions found:
objectformatShow 9 quoted lines
> + GIT_DEFAULT_HASH=sha1 git clone test-sha256 test-clone-sha256 &&
> + GIT_DEFAULT_HASH=sha256 git clone test-sha1 test-clone-sha1 &&
> + git -C test-clone-sha1 status &&
> + git -C test-clone-sha256 status
> +'
> +
> partial_clone_server () {
> SERVER="$1" &&
>