git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] t/perf/run: Use proper "--get-regexp", not "--get-regex"

From
Thomas Gummerer <t.gummerer@gmail.com>
Date
Jun 3, 2018, 13:30 UTC
Message-ID
<20180603133039.GF26159@hank.intra.tgummerer.com>
In-Reply-To
<alpine.LFD.2.21.1806030613080.7681@localhost.localdomain>
> Subject: [PATCH v2] t/perf/run: Use proper "--get-regexp", not

micronit: we prefer starting with a lowercase letter after the "area:" prefix in commit messages. Junio can probably fix that while queuing, so no need to resend.

On 06/03, Robert P. J. Day wrote:
> 
> Even though "--get-regex" appears to work with "git config", the
> clear standard is to spell out the action in full.

--get-regex works as the parse-option API allows abbreviations of the full option to be specified as long as the abbreviation is unambiguos. I don't know if this is documented anywhere other than 'Documentation/technical/api-parse-options.txt' though.

> Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
> 
> ---

It took me a bit to figure out why there is a v2, and what changed between the versions. This space after the '---' would be a good place to describe that to help reviewers.

For others that are curious, it seems like the word "clear" was added in the commit message.

The change itself looks good to me.
Show 26 quoted lines
> this is the only occurrence i saw of this in the entire code base, so
> it seemed worth tweaking just for consistency.
> 
> diff --git a/t/perf/run b/t/perf/run
> index 9aaa733c7..fb5753ea2 100755
> --- a/t/perf/run
> +++ b/t/perf/run
> @@ -110,7 +110,7 @@ run_dirs () {
>  get_subsections () {
>  	section="$1"
>  	test -z "$GIT_PERF_CONFIG_FILE" && return
> -	git config -f "$GIT_PERF_CONFIG_FILE" --name-only --get-regex "$section\..*\.[^.]+" |
> +	git config -f "$GIT_PERF_CONFIG_FILE" --name-only --get-regexp "$section\..*\.[^.]+" |
>  	sed -e "s/$section\.\(.*\)\..*/\1/" | sort | uniq
>  }
> 
> 
> -- 
> 
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                   http://crashcourse.ca/dokuwiki
> 
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
Previous: Robert P. J. DayNext: Robert P. J. Day
Message 2 of 6 in “t/perf/run: Use proper "--get-regexp", not "--get-regex"”
  1. t/perf/run: Use proper "--get-regexp", not "--get-regex"Robert P. J. Day, Jun 3, 2018
  2. Thomas GummererJun 3, 2018
  3. Robert P. J. DayJun 3, 2018
  4. Philip OakleyJun 3, 2018
  5. Robert P. J. DayJun 4, 2018
  6. Junio C HamanoJun 4, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.