]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: fetch: document `--filter=<filter-spec>` option
authorChristian Couder <christian.couder@gmail.com>
Mon, 16 Feb 2026 13:23:11 +0000 (14:23 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Feb 2026 19:46:40 +0000 (11:46 -0800)
The `--filter=<filter-spec>` 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 <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/fetch-options.adoc

index fcba46ee9e5d61c90297d3563187618571ed8a12..1ef9807d00b55a7d21dfd95ba0a3a533073eb093 100644 (file)
@@ -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=<filter-spec>`::
+       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 _<filter-spec>_ 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=<size>` will filter out all blobs of size
+       at least _<size>_. 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`::