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

Re: [PATCH] alias: restore support for simple dotted aliases

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 24, 2026, 22:47 UTC
Message-ID
<xmqqpl3ovuvq.fsf@gitster.g>
In-Reply-To
<20260424151053.917066-1-jonatan@jontes.page>
Jonatan Holmgren <jonatan@jontes.page> writes:
Show 17 quoted lines
> Historically, config entries like alias.foo.bar expanded the alias
> "foo.bar". The subsection-based alias syntax introduced in
> ac1f12a9de (alias: support non-alphanumeric names via subsection
> syntax, 2026-02-18) broke that behavior by treating such entries as
> if they were subsection syntax.
>
> Restore support for the old dotted form by falling back to the full
> name when the final key is not "command". Add tests covering execution
> and help output for simple dotted aliases.
>
> Reported-by: Michael Grossfeld <michael.grossfeld@amd.com>
> Helped-by: Jeff King <peff@peff.net>
> ---
>  alias.c          | 16 ++++++++++++++--
>  help.c           |  9 ++++++++-
>  t/t0014-alias.sh | 12 ++++++++++++
>  3 files changed, 34 insertions(+), 3 deletions(-)

Do we lose the extensibility introduced by the new syntax by going this route, though? I would imagine that

    [alias "frotz"]
	command = !"nitfol"
	help = "run nitfol command"

would have been a natural first addition to the current system to give help text to the alias, but this change makes such an extensibility impossible, doesn't it?

If this change robs the extensibility, it makes mse wonder if the three-level "alias" was a mistake, and we should have instead introduced a new "nalias" that is three level from the get go.

Previous: Kristoffer HaugsbakkNext: Jonatan Holmgren
Message 9 of 18 in “Bug: Hierarchical Aliases no longer work in 2.54.0”
  1. Grossfeld, MichaelApr 23, 2026
  2. Jeff KingApr 23, 2026
  3. Michael GrossfeldApr 23, 2026
  4. René ScharfeApr 23, 2026
  5. Michael GrossfeldApr 23, 2026
  6. Jonatan HolmgrenApr 24, 2026
  7. alias: restore support for simple dotted aliasesJonatan Holmgren, Apr 24, 2026
  8. Kristoffer HaugsbakkApr 24, 2026
  9. Junio C HamanoApr 24, 2026
  10. Jonatan HolmgrenApr 25, 2026
  11. Jeff KingApr 25, 2026
  12. Jeff KingApr 25, 2026
  13. Jonatan HolmgrenApr 26, 2026
  14. Jeff KingApr 26, 2026
  15. Jonatan HolmgrenApr 27, 2026
  16. Junio C HamanoMay 12, 2026
  17. Jeff KingMay 19, 2026
  18. alias: restore support for simple dotted aliasesJonatan Holmgren, Apr 24, 2026

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.