sparse-checkout: upgrade repository to version 1 when enabling extension
The 'extensions' configuration variable gets special meaning in the new repository version, so when enabling the extension we should upgrade the repository to version 1. Signed-off-by: Xin Li <delphij@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -249,6 +249,8 @@ static int set_config(enum sparse_checkout_mode mode)
|
||||
{
|
||||
const char *config_path;
|
||||
|
||||
if (upgrade_repository_format(1) < 0)
|
||||
die(_("unable to upgrade repository format to enable worktreeConfig"));
|
||||
if (git_config_set_gently("extensions.worktreeConfig", "true")) {
|
||||
error(_("failed to set extensions.worktreeConfig setting"));
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user