Subject: Re: [PATCH] dir.c: skip .gitignore, etc larger than INT_MAX

From: Junio C Hamano <[email-masked]>
Date: Tue, 04 Jun 2024 10:45:04 -0700

Jeff King <[email-masked]> writes:

> I was hoping to avoid making up an arbitrary number. But your question
> about gitattributes reminded me that we already did something similar in
> 3c50032ff5 (attr: ignore overly large gitattributes files, 2022-12-01).
> There it's a hard-coded 100MB limit (without even a config option).
>
> Maybe we should just do the same here?

Hmph, I thought the 100MB was only for blobs, as we stream the input
we read from a regular file, but we do have the same limit there
presumably to match what we do to blobs?  I do not mind that, but I
do not mind leaving it a future "consolidate various size limits on
control files used by Git" patch, that unifies the limit for attrs,
excludes, gitmodules, .git/config, etc.