diff mbox series

[v2,17/22] t/t4*: merge a "grep | sed" pipeline

Message ID 20240315194620.10713-18-dev+git@drbeat.li (mailing list archive)
State Accepted
Commit f7caf1479ed5a189ddcf51d9afa7cdd7260de550
Headers show
Series avoid redundant pipelines | expand

Commit Message

Beat Bolli March 15, 2024, 7:46 p.m. UTC
Signed-off-by: Beat Bolli <dev+git@drbeat.li>
---
 t/t4002-diff-basic.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh
index 7afc883ec374..cb3307010c1e 100755
--- a/t/t4002-diff-basic.sh
+++ b/t/t4002-diff-basic.sh
@@ -405,7 +405,7 @@  test_expect_success 'diff-tree -r B A == diff-tree -r -R A B' '
 
 test_expect_success 'diff can read from stdin' '
 	test_must_fail git diff --no-index -- MN - < NN |
-		grep -v "^index" | sed "s#/-#/NN#" >.test-a &&
+		sed "/^index/d; s#/-#/NN#" >.test-a &&
 	test_must_fail git diff --no-index -- MN NN |
 		grep -v "^index" >.test-b &&
 	test_cmp .test-a .test-b