From: Junio C Hamano Date: Thu, 26 Feb 2026 17:00:24 GMT Subject: Re: [PATCH 0/2] Fix small issues in alias subsection handling Message-ID: In-Reply-To: <20260224171245.458377-1-jonatan@jontes.page> Jonatan Holmgren writes: > Hello! > > I have two small patches related to the handling of alias subsections. > The first one is a documentation fix for the example showing the equivalence > between alias.last and alias.last.command, which was missing list continuation marks. > The second patch addresses a compatibility issue where an empty subsection ([alias ""]) > was not treated as a plain [alias], > causing existing entries stored this way to be ignored. > > Thanks for considering these patches! > > Jonatan Holmgren (2): > doc: fix list continuation in alias subsection example > alias: treat empty subsection [alias ""] as plain [alias] > > Documentation/config/alias.adoc | 7 ++++--- > alias.c | 4 ++++ > t/t0014-alias.sh | 14 ++++++++++++++ > 3 files changed, 22 insertions(+), 3 deletions(-) Memory leaks have been reported for these patches, e.g., https://lore.kernel.org/git/6953f6f2-22e8-4efb-8169-395e1c52634f@intel.com/ I _think_ the following would be sufficient to plug it, but please double check and then send in updated version of these two patches incorporating them. Thanks. git.c | 2 +- help.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/git.c b/git.c index c5fad56813..b5eb740e83 100644 --- a/git.c +++ b/git.c @@ -119,7 +119,7 @@ static int list_cmds(const char *spec) } for (size_t i = 0; i < list.nr; i++) puts(list.items[i].string); - string_list_clear(&list, 0); + string_list_clear(&list, 1); return 0; } diff --git a/help.c b/help.c index 82fb2eaa3f..725e92a195 100644 --- a/help.c +++ b/help.c @@ -423,7 +423,7 @@ void list_cmds_by_config(struct string_list *list) return; string_list_sort(list); - string_list_remove_duplicates(list, 0); + string_list_remove_duplicates(list, 1); while (*cmd_list) { struct strbuf sb = STRBUF_INIT; -- 2.53.0-517-g7bf7f89b4a