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

Re: [PATCH 1/2] test-lib: show missing prereq summary

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 15, 2021, 22:10 UTC
Message-ID
<xmqqk0h9cboc.fsf@gitster.g>
In-Reply-To
<20211115195609.g6vq6qfjhyootcqt@fs>
Fabian Stelzer <fs@gigacodes.de> writes:
Show 7 quoted lines
>>I am not sure '\n' is a good idea from portability perspective.  I
>>thought I wrote '\012' in the illustration in my review?
>
> Yes, i was wondering why you did that. When i played around with your
> variant i used \n since it's what i commonly use and find more readable.
> And i'm by far no expert on partability. What platforms would have an
> issue with \n ?

I think I misremembered. b3b753b1 (Fit to Plan 9's ANSI/POSIX compatibility layer, 2020-09-10) does talk about a system whose "tr" does not fully emulate POSIX and wants an octal, but that is not a platform we target for to begin with.

$ git grep '^[ ]*tr .*\\012['\''"]' $ git grep '^[ ]*tr .*\\n['\''"]'

show the same number of hits, even back in v2.0.0. You have to go back to v1.6.0 (which I consider is the oldest and still usable release of significance) to see the source tree without any hit for the latter. The first introduction of tr "\n" (which I consider is a mistake---if we write octal, we do not have to worry about anybody not supporting it) seems to be dea4562b (rerere forget path: forget recorded resolution, 2009-12-25) made by me X-<.

Previous: Fabian StelzerNext: Fabian Stelzer
Message 6 of 11 in “test-lib: improve missing prereq handling”
  1. 0/2 test-lib: improve missing prereq handlingFabian Stelzer, Nov 15, 2021
  2. 1/2 test-lib: show missing prereq summaryFabian Stelzer, Nov 15, 2021
  3. Ævar Arnfjörð BjarmasonNov 15, 2021
  4. Junio C HamanoNov 15, 2021
  5. Fabian StelzerNov 15, 2021
  6. Junio C HamanoNov 15, 2021
  7. Fabian StelzerNov 16, 2021
  8. Junio C HamanoNov 17, 2021
  9. Fabian StelzerNov 17, 2021
  10. 2/2 test-lib: introduce required prereq for test runsFabian Stelzer, Nov 15, 2021
  11. Junio C HamanoNov 16, 2021

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.