Thread (1 message) 1 message, 1 author, 2022-07-19

Re: [PATCH v1 1/7] t7002: add tests for moving from in-cone to out-of-cone

From: Junio C Hamano <hidden>
Date: 2022-07-19 18:30:48

Derrick Stolee [off-list ref] writes:
On 7/19/2022 10:52 AM, Ævar Arnfjörð Bjarmason wrote:
quoted
On Tue, Jul 19 2022, Shaoxuan Yuan wrote:
quoted
+	! grep -x "H sub/d" actual &&
+	grep -x "S folder1/d" actual
This *might* be a portability problem, but probably not. It's listed in
POSIX:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html

But it appears we have no "grep" use of the "-x" option in-tree, at
least from what I found with grepping..
It is helpful to recommend a working alternative when pointing out
an issue like this.

Here, the '-x' option means to match the entire line.

Would using ^ and $ help here?
Yup, that would be quite reasonable and removes the need to use,
learn about, or have your readers wonder about the "-x" option; I do
not think I saw a grep that did not understand the option, though.

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