From: Jeff King Date: Wed, 12 Nov 2025 07:17:57 GMT Subject: Re: [PATCH] attr: avoid recursion when expanding attribute macros Message-ID: <20251112071757.GC431661@coredump.intra.peff.net> In-Reply-To: <20251112070907.GA431661@coredump.intra.peff.net> On Wed, Nov 12, 2025 at 02:09:07AM -0500, Jeff King wrote: > Though I think you might be able to chain macros across files (so > ".gitattributes" introduces macro "foo", and the "sub/.gitattributes" > introduces "bar" which resolves to "foo", and so on). In which case your > total size is larger, and only eventually limited by how deep a tree > we'll accept (another place where we recurse, but there is a > configurable depth limit). I did poke at this briefly, and the answer is: no, you can't do that. We allow macro definitions only at the top-level. Which makes sense, as otherwise you get into confusing dependencies between files. -Peff