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

Re: [PATCH] tests: make 'test_oid' print trailing newline

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 23, 2022, 00:56 UTC
Message-ID
<xmqq3597rl88.fsf@gitster.g>
In-Reply-To
<20221222185804.GE3411@szeder.dev>
SZEDER Gábor <szeder.dev@gmail.com> writes:
Show 13 quoted lines
> On Mon, Dec 19, 2022 at 09:48:49AM +0900, Junio C Hamano wrote:
>> SZEDER Gábor <szeder.dev@gmail.com> writes:
>> >       $ git grep '\stest_oid ' -- ':/t/*.sh'
>> >       $ git grep 'echo "\?$(test_oid ' -- ':/t/*.sh'
>>  ...
>> I found these examples in the log message a bit annoying to see, as
>> experiments are not affected by any grep.patterntype), but they may
>> fail for folks on stricter platforms.
>
> Please feel free to amend the commit message as you see fit.  Usually
> I would do that myself as I'm rather picky of my commit messages, but,
> alas, I'm not versed in portability issues of regexes, so I'm not sure
> what the right regexes would be.

I guess ERE would give us enough expressiveness to say "zero or one" without relying on GNU extension. Saying "Any whitespace" concisely as "\s" would require PCRE (i.e. "grep -P") but because use of it is optional, the best we could do is "[ ]" (in the [bracket]), one is TAB and the other is SPACE).

But reading the message again, they are what the author of the patch did to observe the current codebase, so I think being faithful to what you did would be fine ;-)

In any case, thanks for cleaning it up.
Previous: SZEDER GáborNext: brian m. carlson
Message 4 of 7 in “tests: make 'test_oid' print trailing newline”
  1. tests: make 'test_oid' print trailing newlineSZEDER Gábor, Dec 18, 2022
  2. Junio C HamanoDec 19, 2022
  3. SZEDER GáborDec 22, 2022
  4. Junio C HamanoDec 23, 2022
  5. brian m. carlsonDec 19, 2022
  6. Ævar Arnfjörð BjarmasonDec 19, 2022
  7. Junio C HamanoDec 19, 2022

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.