From: Junio C Hamano Date: Mon, 30 Jun 2025 16:23:41 GMT Subject: Re: [PATCH v3 1/4] test: use "test_grep" Message-ID: In-Reply-To: <044a93014b677914870a872a9c317a46a5a81699.1751128487.git.gitgitgadget@gmail.com> "Leon Michalak via GitGitGadget" writes: > From: Leon Michalak > > Use the modern "test_grep" test utility instead of regular "grep" which > provides better debug information if tests fail. > > This is a prerequisite to the commits that follow which add to both test > files. Just a terminology thing, but we would phrase the last paragraph more like As a preparatory clean-up, use the "test_grep" test utility instead of regular "grep" which provides better debug information if tests fail. to avoid saying "This does X", "This commit is Y", etc. It also avoids giving a wrong impression by misusing the word "prerequisite" which we almost always use for a step that cannot be skipped. While we add new tests to the same file, we _could_ leave these existing tests as-is, but there is a good reason to making this change beforehand, which we often call is a "preparatory clean-up". > @@ -86,7 +86,7 @@ test_expect_success 'revert works (initial)' ' > git add file && > test_write_lines r 1 | git add -i && > git ls-files >output && > - ! grep . output > + test_grep ! . output > ' Good (we sometime see people got the negation wrong). Thanks.