Re: [PATCH] dir.c: skip .gitignore, etc larger than INT_MAX
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 4, 2024, 17:45 UTC
- Message-ID
- <xmqqikyowqjj.fsf@gitster.g>
- In-Reply-To
- <20240604103947.GC1781455@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> 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.