From: Felipe Contreras <felipe.contreras@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git <git@vger.kernel.org>,
"Philippe Blain" <levraiphilippeblain@gmail.com>,
"SZEDER Gábor" <szeder.dev@gmail.com>,
"Jeff King" <peff@peff.net>
Subject: Re: [PATCH v2 0/3] completion: bash: support for recursive/nested aliases
Date: Mon, 9 Nov 2020 20:09:35 -0600 [thread overview]
Message-ID: <CAMP44s3qF2ie=+EgScyQtk_Z5qDeeWXBrJV61NTOkxOy6eBD-g@mail.gmail.com> (raw)
In-Reply-To: <xmqqv9ee7zkx.fsf@gitster.c.googlers.com>
On Mon, Nov 9, 2020 at 7:47 PM Junio C Hamano <gitster@pobox.com> wrote:
> It is unclear why 3/3 needs to be separate (in other words, is there
> a reason why 1/3 and 2/3 need to be done while the function is in
> the more complex form, instead of doing what 1/3 and 2/3 wanted to
> do to the function in a way that does not require later clean-up?),
> but other than that, the end-result looks good.
It doesn't need to be separate. It's there just because the jump from
the current code to 1/3 is more natural this way (v2), but 3/3 can
certainly be merged to 1/3. We will have something a little bit odd in
the history:
cur=$last
if [[ "$cur" != "$1" ]]; then
echo "$cur"
fi
Why not just use $last instead of $cur? And in fact why clear $cur if
we are going to be setting it again?
It's just a little odd, but I sent a v3 with 1/3 and 3/3 merged, and
it's not too odd.
Cheers.
--
Felipe Contreras
prev parent reply other threads:[~2020-11-10 2:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 0:53 [PATCH v2 0/3] completion: bash: support for recursive/nested aliases Felipe Contreras
2020-11-10 0:53 ` [PATCH v2 1/3] completion: bash: support recursive aliases Felipe Contreras
2020-11-10 0:53 ` [PATCH v2 2/3] completion: bash: check for alias loop Felipe Contreras
2020-11-10 0:53 ` [PATCH v2 3/3] completion: bash: simplify __git_aliased_command Felipe Contreras
2020-11-10 1:47 ` [PATCH v2 0/3] completion: bash: support for recursive/nested aliases Junio C Hamano
2020-11-10 2:09 ` Felipe Contreras [this message]
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='CAMP44s3qF2ie=+EgScyQtk_Z5qDeeWXBrJV61NTOkxOy6eBD-g@mail.gmail.com' \
--to=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=levraiphilippeblain@gmail.com \
--cc=peff@peff.net \
--cc=szeder.dev@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).