Re: [PATCH v4 2/7] git: allow alias-shadowing deprecated builtins
- From
Jeff King <peff@peff.net>
- Date
- Sep 11, 2025, 20:44 UTC
- Message-ID
- <20250911204404.GA1907215@coredump.intra.peff.net>
- In-Reply-To
- <20250911203256.GA1894340@coredump.intra.peff.net>
On Thu, Sep 11, 2025 at 04:32:56PM -0400, Jeff King wrote:
Show 13 quoted lines
> On Thu, Sep 11, 2025 at 07:31:04PM +0200, Kristoffer Haugsbakk wrote: > > > But it turns out there is a regression in my code with the recursion > > detection. Compare: > > > > $ ./git -c alias.one=two -c alias.two=two one -h > > 'one' is aliased to 'two' > > 'two' is aliased to 'two' > > fatal: recursive alias: two > > Your example there is a little funny; "two" is recursive to itself, even > without "one". We detect that case in handle_alias(), and we would still > detect:
Also, I meant to say: good catch. :) I did not even think about loop detection at all in my suggestions.
-Peff