]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/t4*: merge a "grep | sed" pipeline
authorBeat Bolli <bb@drbeat.li>
Fri, 15 Mar 2024 19:46:14 +0000 (20:46 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 16 Mar 2024 18:08:57 +0000 (11:08 -0700)
Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Acked-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4002-diff-basic.sh

index 7afc883ec374e1c4b747ed80ba64575d05017502..cb3307010c1ed97f1b7bdb91b366f3e6d17a2ac9 100755 (executable)
@@ -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