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

[PATCH 1/4] t/interop: replace bare grep with test_grep

From
Tyler Cipriani <tyler@tylercipriani.com>
Date
Oct 25, 2026, 06:35 UTC
Message-ID
<20261025063508.3026136-2-tyler@tylercipriani.com>
In-Reply-To
<20261025063508.3026136-1-tyler@tylercipriani.com>
Use test_grep for grep assertions in interop files.

In preparation for combining chainlint and greplint into a single test command, ensure that chainlint and greplint pass on their combined list of shell scripts under test.

Signed-off-by: Tyler Cipriani <tyler@tylercipriani.com>
---
 t/interop/i5700-protocol-transition.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/t/interop/i5700-protocol-transition.sh b/t/interop/i5700-protocol-transition.sh
index 97e8e580ef..b610a64dfc 100755
--- a/t/interop/i5700-protocol-transition.sh
+++ b/t/interop/i5700-protocol-transition.sh
@@ -24,7 +24,7 @@ test_expect_success "git:// clone with $VERSION_A and protocol v1" '
 	git.a -C child log -1 --format=%s >actual &&
 	git.b -C "$repo" log -1 --format=%s >expect &&
 	test_cmp expect actual &&
-	grep "version=1" log
+	test_grep "version=1" log
 '
 
 test_expect_success "git:// fetch with $VERSION_A and protocol v1" '
@@ -35,8 +35,8 @@ test_expect_success "git:// fetch with $VERSION_A and protocol v1" '
 	git.a -C child log -1 --format=%s FETCH_HEAD >actual &&
 
 	test_cmp expect actual &&
-	grep "version=1" log &&
-	! grep "version 1" log
+	test_grep "version=1" log &&
+	test_grep ! "version 1" log
 '
 
 stop_git_daemon
@@ -51,7 +51,7 @@ test_expect_success "file:// clone with $VERSION_A and protocol v1" '
 	git.a -C child2 log -1 --format=%s >actual &&
 	git.b -C parent log -1 --format=%s >expect &&
 	test_cmp expect actual &&
-	! grep "version 1" log
+	test_grep ! "version 1" log
 '
 
 test_expect_success "file:// fetch with $VERSION_A and protocol v1" '
@@ -62,7 +62,7 @@ test_expect_success "file:// fetch with $VERSION_A and protocol v1" '
 	git.a -C child2 log -1 --format=%s FETCH_HEAD >actual &&
 
 	test_cmp expect actual &&
-	! grep "version 1" log
+	test_grep ! "version 1" log
 '
 
 test_done
-- 
2.47.3
Previous: Tyler CiprianiNext: Tyler Cipriani
Message 4 of 7 in “test-grep-lint is uncomfortably slow”
  1. Junio C HamanoOct 6, 2026
  2. Jeff KingOct 14, 2026
  3. 0/4 t: run greplint checks inside chainlintTyler Cipriani, Oct 25, 2026
  4. 1/4 t/interop: replace bare grep with test_grepTyler Cipriani, Oct 25, 2026
  5. 2/4 t/greplint: skip test bodies without the word grepTyler Cipriani, Oct 25, 2026
  6. 3/4 t/greplint: move parsing and token check to libraryTyler Cipriani, Oct 25, 2026
  7. 4/4 t/chainlint: add --greplint to run greplintTyler Cipriani, Oct 25, 2026

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.