t/t4*: merge a "grep | sed" pipeline
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>
Beat Bolli committed
Mar 15, 2024 at 20:46 UTC
f7caf1479ed5a189ddcf51d9afa7cdd7260de550
1 file changed
+1
-1
t/t4002-diff-basic.sh
+1
-1
@@ -405,7 +405,7 @@ test_expect_success 'diff-tree -r B A == diff-tree -r -R A B' '
405
406
test_expect_success 'diff can read from stdin' '
407
test_must_fail git diff --no-index -- MN - < NN |
408
- grep -v "^index" | sed "s#/-#/NN#" >.test-a &&
408
+ sed "/^index/d; s#/-#/NN#" >.test-a &&
409
test_must_fail git diff --no-index -- MN NN |
410
grep -v "^index" >.test-b &&
411
test_cmp .test-a .test-b