Re: [PATCH 5/9] doc: fetch: document `--filter=<filter-spec>` option
From: Christian Couder <hidden>
Date: 2026-02-04 11:19:18
(Sorry but I cannot find the email send by Jean-Noël in Gmail so I am using `git send-email` instead of Gmail to reply.) On Fri, 26 Dec 2025 14:33:38 Jean-Noël AVILA wrote: On Tuesday, 23 December 2025 12:11:09 CET Christian Couder wrote:
quoted
diff --git a/Documentation/fetch-options.adoc b/Documentation/fetch-options.adocquoted
index fcba46ee9e..70a9818331 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=<filter-spec>::The option itself must also be back-ticked. `--filter=<filter-spec>`::
Yeah, I have back-ticked it in v2.
+ 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 Isn't this second sentence redundant? What new information is brought?
I agree it's redundant, but I copied it from the `git-clone` documentation as-is because the goal here is not to improve on the existing documentation but to fix the fact that some documentation is missing. That's why the commit message said "in the same way as it is already documented for `git clone`". I have improved the commit message to make the commit goal clearer though. If the documentation was wrong, I agree that copying it as-is would not be the right thing to do, but here it's not wrong. And it's better to have some docs that are a bit redundant than to miss some docs. Also I think it's better to improve on the documentation in a separate commit because this way: - the `git-clone` documentation could be improved like the `git-fetch` documentation in a single commit (so we get consistent documentation using consistent documentation changes), - how to best remove the redundancy is just a separate topic that I prefer to avoid at least for now. Thanks.