Subject: Re: [PATCH] fetch, clone: add fetch.blobSizeLimit config

From: Jeff King <[email-masked]>
Date: Tue, 3 Mar 2026 09:34:00 -0500

On Mon, Mar 02, 2026 at 01:36:40PM -0800, Alan Braithwaite wrote:

> 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