Files
git/builtin
Alan Braithwaite acefb71d0d clone: add clone.<url>.defaultObjectFilter config
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-03-15 14:24:19 -07:00
..
2025-11-19 10:55:39 -08:00
2026-02-20 08:13:58 -08:00
2025-09-29 11:40:35 -07:00
2026-02-20 08:13:58 -08:00
2026-02-23 13:23:41 -08:00
2026-03-04 10:53:02 -08:00
2025-12-25 08:29:27 +09:00
2025-10-02 12:26:12 -07:00
2025-11-19 10:55:39 -08:00
2026-02-20 08:13:58 -08:00