Re: [PATCH v4 2/7] git: allow alias-shadowing deprecated builtins
- From
Jeff King <peff@peff.net>
- Date
- Sep 10, 2025, 18:34 UTC
- Message-ID
- <20250910183418.GA1157772@coredump.intra.peff.net>
- In-Reply-To
- <b39ba543-24ad-4bd6-be6e-dc1b8a416eb0@app.fastmail.com>
On Wed, Sep 10, 2025 at 07:58:32PM +0200, Kristoffer Haugsbakk wrote:
Show 7 quoted lines
> > So we just need to loop again when it told us that it found an alias (it > > is tempting to just continue in the loop body, but that would miss the > > case of a deprecated alias that resolves to another deprecated alias). > > Yeah, that’s subtle. > > Do you think this should be a test case? I guess it doesn’t hurt.
Yeah, probably would be easy to add. We need two deprecated command names, but it looks like we do have that at this point. :)
Show 5 quoted lines
> > Anyway, I believe that is correct and solves the leak issue (because > > handle_alias() does the lookup and takes care of cleanup itself). > > Thanks again. My local test suite passes. (Except > `t5801-remote-helpers.sh` which never works for me.)
I sometimes see failures there because I've checked out and built an old version which creates git-remote-testgit as a built script. That was later moved into t/t5801 via 5afb2ce4cd (remote-testgit: move it into the support directory for t5801, 2019-04-12). But if you have an old built copy lying around in the project root, then "git fetch" will find that old version first (because it prepends the root GIT_EXEC_PATH to PATH when it runs). So we run the old version, which may or may not support what the more modern test needs.
And deleting "git-remote-testgit" (or just running "git clean") makes it go away.
That may or may not be your problem, of course. ;)
-Peff