[PATCH v2 0/1] fetch: allow adding a filter after initial clone
- From
Xin Li <delphij@google.com>
- Date
- May 28, 2020, 02:53 UTC
- Message-ID
- <20200528025359.20931-1-delphij@google.com>
- In-Reply-To
- <20200513234435.GG6605@camp.crustytoothpaste.net>
Previously, to retroactively add filter to an existing (shallow) clone one would have to manually change the repository configuration to make git to believe that there was an existing promisor, like:
git config core.repositoryFormatVersion 1 git config extensions.partialClone origin git fetch --unshallow --filter=blob:none origin
Because the code can already set up promisor, it would be safer and more convenient to just do that in git itself.
This version of change will also prevent the code from making damaging repository upgrades (when non-standard extensions exists) as pointed out by earlier reviewers.
Xin Li (1): fetch: allow adding a filter after initial clone.
builtin/fetch.c | 3 --- list-objects-filter-options.c | 3 ++- repository.h | 6 ++++++ setup.c | 30 ++++++++++++++++++++++++++++++ t/t0410-partial-clone.sh | 21 +++++++++++++++++++++ 5 files changed, 59 insertions(+), 4 deletions(-)
-- 2.27.0.rc0.183.gde8f92d652-goog