git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] docs: clarify git-rev-list(1) --filter behavior

From
Patrick Steinhardt <ps@pks.im>
Date
Dec 16, 2025, 14:49 UTC
Message-ID
<aUFxbDPucKr42fIJ@pks.im>
In-Reply-To
<xnstt6myzzfyq65w73xuqg7cfso3bdw6tw33shrery4e4gi2zy@pfxq2pjmb2hm>
On Tue, Dec 16, 2025 at 08:36:56AM -0600, Justin Tobler wrote:
Show 29 quoted lines
> On 25/12/16 09:12AM, Patrick Steinhardt wrote:
> > On Tue, Dec 16, 2025 at 10:13:22AM +0900, Junio C Hamano wrote:
> > > > diff --git a/Documentation/rev-list-options.adoc b/Documentation/rev-list-options.adoc
> > > > index d9665d82c8..453ec59057 100644
> > > > --- a/Documentation/rev-list-options.adoc
> > > > +++ b/Documentation/rev-list-options.adoc
> > > > @@ -983,7 +983,9 @@ to name units in KiB, MiB, or GiB.  For example, `blob:limit=1k`
> > > >  is the same as 'blob:limit=1024'.
> > > >  +
> > > >  The form `--filter=object:type=(tag|commit|tree|blob)` omits all objects
> > > > -which are not of the requested type.
> > > > +which are not of the requested type. Note that explicitly provided objects
> > > > +ignore filters and are always printed unless `--filter-provided-objects` is
> > > > +also specified.
> > > 
> > > The above documents the status quo correctly, so let's queue, but it
> > > is unfortunate that we need an extra option to do this.
> > 
> > True. I didn't feel comfortable to change the default to also filter
> > provided objects when I discovered that we don't, hence the new option.
> > It's not great though as it certainly is surprising behaviour, but I'm
> > not sure whether we can really change it without breaking existing
> > users. Oh, well...
> 
> Out of curiousity, are there any known use-cases where a user _would_
> want the provided objects printed along with the filtered ones? From my
> naive perspective it almost doesn't even sound useful and appears to
> just be a sharp edge. This maybe not worthing worrying too much about
> though.

I don't really have an idea, but that's exactly the problem here. Filters are for example used by partial clones, and I don't want to break those because I'm not aware of some of the intricacies. Which doesn't mean that there _are_ use cases where this is actually the desired behaviour, but rather that there needs to be some research to come to a conclusion here.

Patrick
Previous: Justin ToblerNext: Junio C Hamano
Message 5 of 6 in “docs: clarify git-rev-list(1) --filter behavior”
  1. docs: clarify git-rev-list(1) --filter behaviorJustin Tobler, Dec 15, 2025
  2. Junio C HamanoDec 16, 2025
  3. Patrick SteinhardtDec 16, 2025
  4. Justin ToblerDec 16, 2025
  5. Patrick SteinhardtDec 16, 2025
  6. Junio C HamanoDec 16, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.