diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2020-07-15 23:28:18 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-07-16 09:36:39 -0700 |
commit | 62f2eca6065d0c27b0ea3b7806a590466ea04960 (patch) | |
tree | effed1e9c86e1cfc14502ae0afbf15affb11329f /t | |
parent | Revert "check_repository_format_gently(): refuse extensions for old repositor... (diff) | |
download | tgif-62f2eca6065d0c27b0ea3b7806a590466ea04960.tar.xz |
repository: allow repository format upgrade with extensions
Now that we officially permit repository extensions in repository
format v0, permit upgrading a repository with extensions from v0 to v1
as well.
For example, this means a repository where the user has set
"extensions.preciousObjects" can use "git fetch --filter=blob:none
origin" to upgrade the repository to use v1 and the partial clone
extension.
To avoid mistakes, continue to forbid repository format upgrades in v0
repositories with an unrecognized extension. This way, a v0 user
using a misspelled extension field gets a chance to correct the
mistake before updating to the less forgiving v1 format.
While we're here, make the error message for failure to upgrade the
repository format a bit shorter, and present it as an error, not a
warning.
Reported-by: Huan Huan Chen <huanhuanchen@google.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t0410-partial-clone.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t0410-partial-clone.sh b/t/t0410-partial-clone.sh index 51d1eba605..6aa0f313bd 100755 --- a/t/t0410-partial-clone.sh +++ b/t/t0410-partial-clone.sh @@ -42,7 +42,7 @@ test_expect_success 'convert shallow clone to partial clone' ' test_cmp_config -C client 1 core.repositoryformatversion ' -test_expect_success 'converting to partial clone fails with noop 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 && @@ -50,7 +50,7 @@ test_expect_success 'converting to partial clone fails with noop extension' ' git clone --depth=1 "file://$(pwd)/server" client && test_cmp_config -C client 0 core.repositoryformatversion && git -C client config extensions.noop true && - test_must_fail git -C client fetch --unshallow --filter="blob:none" + git -C client fetch --unshallow --filter="blob:none" ' test_expect_success 'converting to partial clone fails with unrecognized extension' ' |