Re: [PATCH v4 2/7] git: allow alias-shadowing deprecated builtins
- From
- Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
- Date
- Sep 15, 2025, 06:27 UTC
- Message-ID
- <7d63af22-3886-4dcf-863e-dec333601b3b@app.fastmail.com>
- In-Reply-To
- <20250915014451.GA44900@coredump.intra.peff.net>
On Mon, Sep 15, 2025, at 03:44, Jeff King wrote:
Show 14 quoted lines
> On Sun, Sep 14, 2025 at 07:24:14PM +0200, Kristoffer Haugsbakk wrote: > >> > If you want to get rid of that last paragraph, I think it really is as >> > simple as checking the expanded alias new_argv[0] as soon as we see it, >> > like: >> >> I tried using both of these changes (the patches) but the `alias...` >> test suite started failing. > > Hmm, it still passes for me. If I do just this on top of your v5, it > likewise passes (except for your new test which expects the redundant > line). > >[snip diff]
That works for me. Thanks! I will send the next round this evening or tomorrow.
It will be good to get rid of those footnotes.
Show 16 quoted lines
>> I ended up with not changing it for v5. I missed the first time around >> that this informational message is only “logged” in the specific case of >> `<git cmd> -h`. In turn you only get one more line of output when you >> are (1) chaining deprecated aliases, and (2) making a loop. > > I don't think (1) is necessary. With your v5 I get: > > $ ./git -c alias.one=two -c alias.two=one one -h > 'one' is aliased to 'two' > 'two' is aliased to 'one' > 'one' is aliased to 'two' > fatal: alias loop detected: expansion of 'one' does not terminate: > one <== > two ==> > > So the extra line is printed even without deprecated aliases.
That’s right, that part’s in error.