t/t3*: merge a "grep | awk" 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>
This commit is contained in:
Beat Bolli 2024-03-15 20:46:13 +01:00 committed by Junio C Hamano
parent 8a3c5ccc4d
commit 67dd07e8af

View file

@ -97,7 +97,7 @@ test_expect_success 'branch: --verbose works with messages using CRLF' '
git branch -v >tmp &&
# Remove first two columns, and the line for the currently checked out branch
current=$(git branch --show-current) &&
grep -v $current <tmp | awk "{\$1=\$2=\"\"}1" >actual &&
awk "/$current/ { next } { \$1 = \$2 = \"\" } 1" <tmp >actual &&
test_cmp expect actual
'