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

Re: [PATCH] completion: bash: improve alias loop detection

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Nov 17, 2020, 19:52 UTC
Message-ID
<CAMP44s3dFZ4EjOgYd_e5JvNQWH_6bjLAHCYMa7n2kOFXWHCwcg@mail.gmail.com>
In-Reply-To
<xmqqtutn6ccp.fsf@gitster.c.googlers.com>
On Tue, Nov 17, 2020 at 12:57 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
>
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
> > It is possible for the name of an alias to end with the name of another
> > alias, in which case the code will incorrectly detect a loop.
> >
> > We can fix that by adding an extra space between words.
> >
> > Suggested-by: SZEDER Gábor <szeder.dev@gmail.com>
> > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> > ---
> >  contrib/completion/git-completion.bash | 9 +++++----
> >  1 file changed, 5 insertions(+), 4 deletions(-)
>
> OK.  An extra local variable would not hurt and makes the code
> easier to read.
It was there on v2. Which now may be a more reasonable sequence.
-- 
Felipe Contreras
Previous: Junio C Hamano
Message 3 of 3 in “completion: bash: improve alias loop detection”
  1. completion: bash: improve alias loop detectionFelipe Contreras, Nov 12, 2020
  2. Junio C HamanoNov 17, 2020
  3. Felipe ContrerasNov 17, 2020

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.