From 62f2eca6065d0c27b0ea3b7806a590466ea04960 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Wed, 15 Jul 2020 23:28:18 -0700 Subject: 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 Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- cache.h | 1 - 1 file changed, 1 deletion(-) (limited to 'cache.h') diff --git a/cache.h b/cache.h index e5885cc9ea..0f0485ecfe 100644 --- a/cache.h +++ b/cache.h @@ -1042,7 +1042,6 @@ struct repository_format { int worktree_config; int is_bare; int hash_algo; - int has_extensions; char *work_tree; struct string_list unknown_extensions; }; -- cgit v1.2.3