]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/t3*: merge a "grep | awk" pipeline
authorBeat Bolli <bb@drbeat.li>
Fri, 15 Mar 2024 19:46:13 +0000 (20:46 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 16 Mar 2024 18:08:56 +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/t3920-crlf-messages.sh

index 5eed640a6825dd4522e5c68d12364768a06d9c3b..50ae222f08424e4b4ed22a82c066526a3da3659c 100755 (executable)
@@ -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
 '