From: Felipe Contreras <felipe.contreras@gmail.com>
To: Felipe Contreras <felipe.contreras@gmail.com>,
Denton Liu <liu.denton@gmail.com>,
Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, "SZEDER Gábor" <szeder.dev@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>,
"Jonathan Nieder" <jrnieder@gmail.com>
Subject: Re: [PATCH 1/2] test: completion: add tests for __git_complete
Date: Mon, 28 Dec 2020 18:36:17 -0600 [thread overview]
Message-ID: <5fea7a017271f_22e4c208a5@natae.notmuch> (raw)
In-Reply-To: <5fea746c536c0_22b892087a@natae.notmuch>
Felipe Contreras wrote:
> Denton Liu wrote:
> > Hi Felipe,
> >
> > On Mon, Dec 28, 2020 at 01:23:01PM -0600, Felipe Contreras wrote:
> > > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> > > ---
> > > t/t9902-completion.sh | 7 +++++++
> > > 1 file changed, 7 insertions(+)
> > >
> > > diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
> > > index a1c4f1f6d4..2e59fe4de0 100755
> > > --- a/t/t9902-completion.sh
> > > +++ b/t/t9902-completion.sh
> > > @@ -2380,4 +2380,11 @@ test_expect_success 'sourcing the completion script clears cached --options' '
> > > verbose test -z "$__gitcomp_builtin_notes_edit"
> > > '
> > >
> > > +test_expect_success '__git_complete' '
> > > + __git_complete foo __git_main &&
> > > + test "$(type -t __git_wrap__git_main)" == function &&
> >
> > s/==/=/ for this and the other patch.
>
> Sure, I'll include that in the next version.
>
> But I expect people will make further comments on the whole method to
> find out if a function exists.
I just noticed there's already a check for that in git-completion.bash:
if declare -f $completion_func >/dev/null 2>/dev/null
I suppose that's prefered to: if test "$(type -t func)" = function
--
Felipe Contreras
next prev parent reply other threads:[~2020-12-29 0:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-28 19:23 [PATCH 0/2] completion: make __git_complete public Felipe Contreras
2020-12-28 19:23 ` [PATCH 1/2] test: completion: add tests for __git_complete Felipe Contreras
2020-12-28 22:57 ` Denton Liu
2020-12-29 0:12 ` Felipe Contreras
2020-12-29 0:36 ` Felipe Contreras [this message]
2020-12-28 19:23 ` [PATCH 2/2] completion: add proper public __git_complete Felipe Contreras
2020-12-28 19:26 ` Felipe Contreras
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=5fea7a017271f_22e4c208a5@natae.notmuch \
--to=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=liu.denton@gmail.com \
--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.
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).