From: Christian Couder Date: Mon, 16 Feb 2026 13:23:11 +0000 (+0100) Subject: doc: fetch: document `--filter=` option X-Git-Tag: v2.54.0-rc0~167^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=190438b62fa5624077c2ee48065f47e1a56d01a7;p=thirdparty%2Fgit.git doc: fetch: document `--filter=` option The `--filter=` option is documented in most commands that support it except `git fetch`. Let's fix that and document this option. To ensure consistency across commands, let's reuse the exact description currently found in `git clone`. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- diff --git a/Documentation/fetch-options.adoc b/Documentation/fetch-options.adoc index fcba46ee9e..1ef9807d00 100644 --- a/Documentation/fetch-options.adoc +++ b/Documentation/fetch-options.adoc @@ -88,6 +88,16 @@ linkgit:git-config[1]. This is incompatible with `--recurse-submodules=(yes|on-demand)` and takes precedence over the `fetch.output` config option. +`--filter=`:: + Use the partial clone feature and request that the server sends + a subset of reachable objects according to a given object filter. + When using `--filter`, the supplied __ is used for + the partial fetch. For example, `--filter=blob:none` will filter + out all blobs (file contents) until needed by Git. Also, + `--filter=blob:limit=` will filter out all blobs of size + at least __. For more details on filter specifications, see + the `--filter` option in linkgit:git-rev-list[1]. + ifndef::git-pull[] `--write-fetch-head`:: `--no-write-fetch-head`::