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

2 messages, 2 authors, 2021-11-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2021-11-15 17:54:43

Ævar Arnfjörð Bjarmason [off-list ref] writes:
quoted
+if test -n "$missing_prereq"
+then
+	unique_missing_prereq=$(
+		echo $missing_prereq |
+		tr -s "," "\n" |
+		grep -v '^$' |
+		sort -u |
+		paste -s -d ',')
What is paste? Some out-of-tree debugging utility?
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/paste.html

Don't feel bad for not knowing it.  I usually do not use cut or paste
myself and I had to look it up the other day while reviewing the RFC
phase of this series.

I am not sure '\n' is a good idea from portability perspective.  I
thought I wrote '\012' in the illustration in my review?

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

From: Fabian Stelzer <hidden>
Date: 2021-11-15 20:34:35

On 15.11.2021 09:53, Junio C Hamano wrote:
Ævar Arnfjörð Bjarmason [off-list ref] writes:
quoted
quoted
+if test -n "$missing_prereq"
+then
+	unique_missing_prereq=$(
+		echo $missing_prereq |
+		tr -s "," "\n" |
+		grep -v '^$' |
+		sort -u |
+		paste -s -d ',')
What is paste? Some out-of-tree debugging utility?
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/paste.html

Don't feel bad for not knowing it.  I usually do not use cut or paste
myself and I had to look it up the other day while reviewing the RFC
phase of this series.

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'll take a look at Ævars generate-cmdlist code and will use \012 in a
reroll.

Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help