From: Jeff King <peff@peff•net>
To: Ben Knoble <ben.knoble@gmail•com>
Cc: git@vger•kernel.org, Ben Stav <benstav@miggo•io>
Subject: Re: [PATCH] attr: avoid recursion when expanding attribute macros
Date: Wed, 12 Nov 2025 02:17:57 -0500 [thread overview]
Message-ID: <20251112071757.GC431661@coredump.intra.peff.net> (raw)
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
next prev parent reply other threads:[~2025-11-12 7:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 22:36 [PATCH] attr: avoid recursion when expanding attribute macros Jeff King
2025-11-12 1:30 ` Ben Knoble
2025-11-12 7:09 ` Jeff King
2025-11-12 7:17 ` Jeff King [this message]
2025-11-12 6:57 ` Patrick Steinhardt
2025-11-12 7:16 ` Jeff King
2025-11-12 10:21 ` Patrick Steinhardt
2025-11-12 17:40 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251112071757.GC431661@coredump.intra.peff.net \
--to=peff@peff$(echo .)net \
--cc=ben.knoble@gmail$(echo .)com \
--cc=benstav@miggo$(echo .)io \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox