Re: [PATCH v6] clone: add clone.<url>.defaultObjectFilter config
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 15, 2026, 21:32 UTC
- Message-ID
- <xmqqldfsrd7c.fsf@gitster.g>
- In-Reply-To
- <pull.2058.v6.git.1773553022381.gitgitgadget@gmail.com>
"Alan Braithwaite via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 37 quoted lines
> From: Alan Braithwaite <alan@braithwaite.dev> > > Add a new configuration option that lets users specify a default > partial clone filter, optionally scoped by URL pattern. When > cloning a repository whose URL matches a configured pattern, > git-clone automatically applies the filter, equivalent to passing > --filter on the command line. > > [clone] > defaultObjectFilter = blob:limit=1m > > [clone "https://github.com/"] > defaultObjectFilter = blob:limit=5m > > [clone "https://internal.corp.com/large-project/"] > defaultObjectFilter = blob:none > > The bare clone.defaultObjectFilter applies to all clones. The > URL-qualified form clone.<url>.defaultObjectFilter restricts the > setting to matching URLs. URL matching uses the existing > urlmatch_config_entry() infrastructure, following the same rules as > http.<url>.* — a domain, namespace, or specific project can be > matched, and the most specific match wins. > > The config only affects the initial clone. Once the clone completes, > the filter is recorded in remote.<name>.partialCloneFilter, so > subsequent fetches inherit it automatically. An explicit --filter > on the command line takes precedence, and --no-filter defeats the > configured default entirely. > > Signed-off-by: Alan Braithwaite <alan@braithwaite.dev> > --- > fetch, clone: add fetch.blobSizeLimit config > > Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2058%2Fabraithwaite%2Falan%2Ffetch-blob-size-limit-v6 > Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2058/abraithwaite/alan/fetch-blob-size-limit-v6 > Pull-Request: https://github.com/gitgitgadget/git/pull/2058
I as a bistander reviewer would have appreciated some mention of where some changes relative to the previous iteration came from.
E.g., check for !normalized_url case is from a realization that url_normaize() can return NULL. Use of test_when_finished all of the place is to clean cruft after each test did its thing.
What I am most unsure about is what the removal of "large.bin" in a test is about. What was it trying to achieve by having the file that weighs 100kB, and what was the reason the file got removed (is it because whatever the presence of the file was trying to verify in the previous iteration is already checked by other means and if so what is it? Or is it something else?).
Mechanically generated range-diff alone does not answer questions like the above.
Other than the "dd" thing, everything is looking good.
Will replace. Thanks.