Thread (7 messages) 7 messages, 3 authors, 2025-11-12

Re: [PATCH] attr: avoid recursion when expanding attribute macros

From: Jeff King <hidden>
Date: 2025-11-12 07:17:58

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help