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

From: Junio C Hamano <[email-masked]>
Date: Fri, 31 May 2024 08:05:03 -0700

Jeff King <[email-masked]> writes:

> The "int" in question is in add_patterns_from_buffer(), so we could
> catch it there. But by putting the checks in its two callers, we can
> produce more useful error messages.

Nice trick.  I wondered if we want INT_MAX/2 or something even
lower, but because once these things are read, we only parse the
contents so allowing up to INT_MAX is fine.  It is not like we read
this and that and concatenate them into a larger buffer.