diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-07-16 17:58:42 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-07-16 17:58:42 -0700 |
commit | d13b7f21989335c0ac14e3a0c7eaaee0bc30ea70 (patch) | |
tree | bef23ee949b0c34d0bc9d4ee908e26b116cc62b8 /t | |
parent | Hopefully the last batch before -rc1 (diff) | |
parent | repository: allow repository format upgrade with extensions (diff) | |
download | tgif-d13b7f21989335c0ac14e3a0c7eaaee0bc30ea70.tar.xz |
Merge branch 'jn/v0-with-extensions-fix' into master
In 2.28-rc0, we corrected a bug that some repository extensions are
honored by mistake even in a version 0 repositories (these
configuration variables in extensions.* namespace were supposed to
have special meaning in repositories whose version numbers are 1 or
higher), but this was a bit too big a change.
* jn/v0-with-extensions-fix:
repository: allow repository format upgrade with extensions
Revert "check_repository_format_gently(): refuse extensions for old repositories"
Diffstat (limited to 't')
-rwxr-xr-x | t/t0410-partial-clone.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh index 463dc3a8be..6aa0f313bd 100755 --- a/t/t0410-partial-clone.sh +++ b/t/t0410-partial-clone.sh @@ -42,14 +42,25 @@ test_expect_success 'convert shallow clone to partial clone' ' test_cmp_config -C client 1 core.repositoryformatversion ' -test_expect_success 'convert shallow clone to partial clone must fail with any extension' ' +test_expect_success 'convert to partial clone with noop extension' ' rm -fr server client && test_create_repo server && test_commit -C server my_commit 1 && test_commit -C server my_commit2 1 && git clone --depth=1 "file://$(pwd)/server" client && test_cmp_config -C client 0 core.repositoryformatversion && - git -C client config extensions.partialclone origin && + git -C client config extensions.noop true && + git -C client fetch --unshallow --filter="blob:none" +' + +test_expect_success 'converting to partial clone fails with unrecognized extension' ' + rm -fr server client && + test_create_repo server && + test_commit -C server my_commit 1 && + test_commit -C server my_commit2 1 && + git clone --depth=1 "file://$(pwd)/server" client && + test_cmp_config -C client 0 core.repositoryformatversion && + git -C client config extensions.nonsense true && test_must_fail git -C client fetch --unshallow --filter="blob:none" ' |