Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-06-30 00:17:24 +0300
committerJunio C Hamano <gitster@pobox.com>2020-06-30 00:17:24 +0300
commit1033b982914206285fb7ee772cd29f7c60c4f929 (patch)
treedfae7465da8c987e8085ff6daccee6312505cc15 /builtin
parentf402ea68166bd77f09b176c96005ac7f8886e14b (diff)
parent14c7fa269e42df4133edd9ae7763b678ed6594cd (diff)
Merge branch 'xl/upgrade-repo-format'
Allow runtime upgrade of the repository format version, which needs to be done carefully. There is a rather unpleasant backward compatibility worry with the last step of this series, but it is the right thing to do in the longer term. * xl/upgrade-repo-format: check_repository_format_gently(): refuse extensions for old repositories sparse-checkout: upgrade repository to version 1 when enabling extension fetch: allow adding a filter after initial clone repository: add a helper function to perform repository format upgrade
Diffstat (limited to 'builtin')
-rw-r--r--builtin/fetch.c3
-rw-r--r--builtin/sparse-checkout.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index da11165ce2..82ac4be8a5 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1795,9 +1795,6 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
if (depth || deepen_since || deepen_not.nr)
deepen = 1;
- if (filter_options.choice && !has_promisor_remote())
- die("--filter can only be used when extensions.partialClone is set");
-
if (all) {
if (argc == 1)
die(_("fetch --all does not take a repository argument"));
diff --git a/builtin/sparse-checkout.c b/builtin/sparse-checkout.c
index 595463be68..4003f4d13a 100644
--- a/builtin/sparse-checkout.c
+++ b/builtin/sparse-checkout.c
@@ -253,6 +253,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;