From: Duy Nguyen <pclouds@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] completion: fix __gitcomp_builtin no longer consider extra options
Date: Mon, 22 Oct 2018 16:34:16 +0200 [thread overview]
Message-ID: <CACsJy8B-NtKb1sk_CxwB-bffMsy+nDGL2-MpkScBF5vvGHFBjA@mail.gmail.com> (raw)
In-Reply-To: <xmqqr2giwsep.fsf@gitster-ct.c.googlers.com>
On Mon, Oct 22, 2018 at 5:51 AM Junio C Hamano <gitster@pobox.com> wrote:
>
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
>
> > __gitcomp_builtin() has the main completion list provided by
> >
> > git xxx --git-completion-helper
> >
> > but the caller can also add extra options that is not provided by
> > --git-completion-helper. The only call site that does this is "git
> > difftool" completion.
> >
> > This support is broken by b221b5ab9b (completion: collapse extra
> > --no-.. options - 2018-06-06), which adds a special value "--" to mark
> > that the rest of the options can be hidden by default. The commit
> > forgets the fact that extra options are appended after
> > "$(git xxx --git-completion-helper)", i.e. after this "--", and will
> > be incorrectly hidden as well.
> >
> > Prepend the extra options before "$(git xxx --git-completion-helper)"
> > to avoid this.
>
> Thanks for a clear analysis. How did you find it? Got annoyed that
> completion of difftool got broken, or discovered while trying to
> apply the same trick as difftool completion uses to another one and
> seeing that the technique does not work?
I was fixing format-patch completion and was surprised it did not work
as expected. Never really used difftool myself :P I only found out
about it when I asked myself "why wasn't this breakage found earlier?"
--
Duy
next prev parent reply other threads:[~2018-10-22 14:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-21 8:37 [PATCH] completion: fix __gitcomp_builtin no longer consider extra options Nguyễn Thái Ngọc Duy
2018-10-22 3:51 ` Junio C Hamano
2018-10-22 14:34 ` Duy Nguyen [this message]
2018-10-22 17:49 ` SZEDER Gábor
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACsJy8B-NtKb1sk_CxwB-bffMsy+nDGL2-MpkScBF5vvGHFBjA@mail.gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).