]> git.ipfire.org Git - thirdparty/git.git/commit
t7407: use test_grep
authorJeff King <peff@peff.net>
Tue, 7 Jan 2025 07:18:24 +0000 (02:18 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 Jan 2025 16:31:45 +0000 (08:31 -0800)
commitddb5287894c491686e6dc1a82e1c3d0f34e56a7f
treed8b27e70d313b3c7d0266a7abeecbf8b58c5dfe9
parent4f71522dfb7fc53eff569023303980c66114b1bc
t7407: use test_grep

There are a few grep calls here that can benefit from test_grep, which
produces more user-friendly output when it fails.

One of these calls also passes "-sq", which is curious. The "-q" option
suppresses the matched output. But test output is either already
redirected to /dev/null in non-verbose mode, and in verbose mode it's
better to see the output. The "-s" option suppresses errors opening
files, but we are just grepping in the "expected" file we just
generated, so it should not be needed. Neither of these was really
hurting anything, but they are not a style we'd like to see emulated. So
get rid of them.

(It is also curious to grep in the expected file in the first place, but
that is because we are auto-generating the expectation from a Git
command. So this is double-checking it did what we wanted).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7407-submodule-foreach.sh