Re: [PATCH] fetch, clone: add fetch.blobSizeLimit config
- From
Jeff King <peff@peff.net>
- Date
- Mar 3, 2026, 14:34 UTC
- Message-ID
- <20260303143400.GA820518@coredump.intra.peff.net>
- In-Reply-To
- <a3e064fe-9f0d-448f-b034-4a95dcd3fe97@app.fastmail.com>
On Mon, Mar 02, 2026 at 01:36:40PM -0800, Alan Braithwaite wrote:
Show 10 quoted lines
> Peff wrote: > > We actually can do blob:limit filters with bitmaps. See > > 84243da129 (pack-bitmap: implement BLOB_LIMIT filtering, > > 2020-02-14). > > Good to know. I'm not positive, but my understanding is that > this patch only touches client code, and the server sees an > identical request to what `git clone --filter=blob:limit=1m` > already sends today. If that's correct, anyone can already > impose that cost — this patch just makes it easier to opt in.
Yes, that's correct. The server protects itself by refusing to support certain filters that are too expensive. Usually by setting uploadpackfilter.allow to "false", followed by enabling uploadpackfilter.*.allow for particular filters.
When we added those, we left the defaults as-is (allowing everything). That's OK for casual use amongst your own repositories, but terrible for a hosting site. I don't know if it would be worth revisiting the defaults.
But anyway, all orthogonal to the topic in this thread.
-Peff