git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH] Allow aliases that include other aliases

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 4, 2018, 17:55 UTC
Message-ID
<xmqqsh2p9mg8.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180904173915.2393-1-timschumi@gmx.de>
Tim Schumacher <timschumi@gmx.de> writes:
> I submitted this as RFC because I'm not sure whether disallowing
> nested aliases was an intentional design choice. The done_alias
> check implies that disallowing is intended, but the direct
> recursion check for aliases that call themselves opposes that.

"direct recursion check for aliases"? I am not sure what you mean by that, but anyway.

If I recall correctly, it is intended that we disallow run_argv() doing handle_alias() twice (or more). But the ultimate objective is to forbid infinite loops, "git foo" expanding to "git bar" which in turn expanding back to "git foo", and the current "do not expand alias to another" is a simple but too strict implementation. As long as a replacement implementation still forbids infinite loops with reasonable cost and complexity, I do not think we would mind such an improvement to allow alias expanding to another alias.

Previous: Tim SchumacherNext: Jeff King
Message 2 of 3 in “Allow aliases that include other aliases”
  1. Allow aliases that include other aliasesTim Schumacher, Sep 4, 2018
  2. Junio C HamanoSep 4, 2018
  3. Jeff KingSep 4, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.