Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonatan Holmgren <jonatan@jontes.page>
Cc: git@vger.kernel.org,  peff@peff.net,  rsch@web.de,
	michael.grossfeld@amd.com
Subject: Re: [PATCH] alias: restore support for simple dotted aliases
Date: Sat, 25 Apr 2026 07:47:05 +0900	[thread overview]
Message-ID: <xmqqpl3ovuvq.fsf@gitster.g> (raw)
In-Reply-To: <20260424151053.917066-1-jonatan@jontes.page> (Jonatan Holmgren's message of "Fri, 24 Apr 2026 17:10:48 +0200")

Jonatan Holmgren <jonatan@jontes.page> 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 <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.

  parent reply	other threads:[~2026-04-24 22:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-23 18:19 Bug: Hierarchical Aliases no longer work in 2.54.0 Grossfeld, Michael
2026-04-23 21:12 ` Jeff King
2026-04-23 22:55   ` Michael Grossfeld
2026-04-23 21:36 ` René Scharfe
2026-04-23 22:46   ` Michael Grossfeld
2026-04-24  7:29 ` Jonatan Holmgren
2026-04-24 15:10 ` [PATCH] alias: restore support for simple dotted aliases Jonatan Holmgren
2026-04-24 16:09   ` Kristoffer Haugsbakk
2026-04-24 22:47   ` Junio C Hamano [this message]
2026-04-25  9:57     ` Jonatan Holmgren
2026-04-25 23:29       ` Jeff King
2026-04-25 23:47         ` Jeff King
2026-04-26 19:21         ` Jonatan Holmgren
2026-04-26 23:01           ` Jeff King
2026-04-27  8:36             ` Jonatan Holmgren
2026-05-12  4:43               ` Junio C Hamano
2026-04-24 16:17 ` Jonatan Holmgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqpl3ovuvq.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jonatan@jontes.page \
    --cc=michael.grossfeld@amd.com \
    --cc=peff@peff.net \
    --cc=rsch@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox