git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "SZEDER Gábor" <szeder@ira.uka.de>
To: Jacob Keller <jacob.keller@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Git mailing list <git@vger.kernel.org>
Subject: Re: [PATCH] completion: fix completing unstuck email alias arguments
Date: Sun, 13 Dec 2015 02:00:38 +0100	[thread overview]
Message-ID: <20151213020038.Horde.rlO28-SYLxFX00yK-iahGJs@webmail.informatik.kit.edu> (raw)
In-Reply-To: <CA+P7+xrHhWHp8WA8EF7jzsit50uW13=-NEzf0DwNfMyu2dckhA@mail.gmail.com>


Quoting Jacob Keller <jacob.keller@gmail.com>:

> On Fri, Dec 11, 2015 at 4:18 PM, SZEDER Gábor <szeder@ira.uka.de> wrote:
>> Completing unstuck form of email aliases doesn't quite work:
>>
>> $ git send-email --to <TAB>
>> alice   bob     cecil
>> $ git send-email --to a<TAB>
>> alice   bob     cecil
>>
>
> Woops. Is it possible to add a test for this case? I honestly don't
> know how the tests for the completion works.

It's possible, but I'm not sure we should.

It's a common pattern throughout the completion script to call
__gitcomp() (or __gitcomp_nl()) this way, out of the almost 200
callsites many look like this one.  We don't test all those, because
it would require a lot of tests for not that much gain in coverage
in my opinion.  The interesting thing that's definitely worth testing
is what happens inside the command substitution that supplies the
possible completion words, but your tests added to the send-email
testsuite already cover that thoroughly.

Gábor

      reply	other threads:[~2015-12-13  1:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-12  0:18 [PATCH] completion: fix completing unstuck email alias arguments SZEDER Gábor
2015-12-12  1:56 ` Jacob Keller
2015-12-13  1:00   ` SZEDER Gábor [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=20151213020038.Horde.rlO28-SYLxFX00yK-iahGJs@webmail.informatik.kit.edu \
    --to=szeder@ira.uka.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jacob.keller@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).