git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "SZEDER Gábor" <szeder@ira.uka.de>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 1/2] config: add options to list only variable names
Date: Wed, 27 May 2015 23:34:29 +0200	[thread overview]
Message-ID: <20150527233429.Horde.PBcL7R4evwj_kC7y78ZSIA2@webmail.informatik.kit.edu> (raw)
In-Reply-To: <20150527210438.GB22815@peff.net>


Quoting Jeff King <peff@peff.net>:

> On Wed, May 27, 2015 at 10:07:19PM +0200, SZEDER Gábor wrote:
>
>> Help the completion script by introducing the '--list-names' and
>> '--get-names-regexp' options, the "names-only" equivalents of '--list' and
>> '--get-regexp', so it doesn't have to separate variable names from their
>> values anymore.
>
> Thanks, this sounds like the best solution. It should be a tiny bit more
> efficient, too, though I doubt it matters much in practice.
>
>> -'git config' [<file-option>] [-z|--null] -l | --list
>> +'git config' [<file-option>] [-z|--null] -l | --list | --list-name
>
> s/list-name/&s/, to match the code (and your commit message).

And note how I added an extra 's' to the other option in the commit message!

>>  cat > expect << EOF
>> +beta.noindent
>> +nextsection.nonewline
>> +123456.a123
>> +version.1.2.3eX.alpha
>> +EOF
>> +
>> +test_expect_success 'working --list-names' '
>> +	git config --list-names > output &&
>> +	test_cmp expect output
>> +'
>> +
>> +cat > expect << EOF
>
> We usually avoid the extra space after redirection operators. But we
> also usually match existing code. I'm not sure which is more evil in
> this case. ;)
>
>> +test_expect_success '--get-name-regexp' '
>> +	git config --get-name-regexp in >output &&
>> +	test_cmp expect output
>> +'
>
> This one is the odd man out if you are following existing style,
> though.

Heh, in both cases I simply copied the existing "name-less" test, and  
only adjusted the expected output and the name of the option to test. :)

Will reroll.

Gábor

  parent reply	other threads:[~2015-05-27 21:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27 20:07 [PATCH 1/2] config: add options to list only variable names SZEDER Gábor
2015-05-27 20:07 ` [PATCH 2/2] completion: use new 'git config' options to reliably list " SZEDER Gábor
2015-05-27 20:11   ` [PATCH 1.5/2] config: add options to list only " SZEDER Gábor
2015-05-28 12:06     ` Christian Couder
2015-05-27 21:05   ` [PATCH 2/2] completion: use new 'git config' options to reliably list " Jeff King
2015-05-27 21:04 ` [PATCH 1/2] config: add options to list only " Jeff King
2015-05-27 21:08   ` Jeff King
2015-05-27 21:34   ` SZEDER Gábor [this message]
2015-05-27 22:20 ` Junio C Hamano
2015-05-28 12:29 ` [PATCH v2 0/2] config: list only variable names for completion SZEDER Gábor
2015-05-28 12:29   ` [PATCH v2 1/2] config: add options to list only variable names SZEDER Gábor
2015-05-28 19:20     ` Junio C Hamano
2015-05-28 19:36       ` Junio C Hamano
2015-05-29 11:34       ` Christian Couder
2015-05-29 11:39         ` Jeff King
2015-05-28 12:29   ` [PATCH v2 2/2] completion: use new 'git config' options to reliably list " SZEDER Gábor
2015-05-28 20:39   ` [PATCH v2 0/2] config: list only variable names for completion Jeff King

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=20150527233429.Horde.PBcL7R4evwj_kC7y78ZSIA2@webmail.informatik.kit.edu \
    --to=szeder@ira.uka.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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).