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

From: Junio C Hamano <[email-masked]>
Date: Sat, 25 Apr 2026 07:47:05 +0900

Jonatan Holmgren <[email-masked]> writes:

> 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 <[email-masked]>
> Helped-by: Jeff King <[email-masked]>
> ---
>  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.