]> git.99rst.org Git - git.git/commitdiff
t/t3*: merge a "grep | awk" pipeline
authorBeat Bolli <redacted>
Fri, 15 Mar 2024 19:46:13 +0000 (20:46 +0100)
committerJunio C Hamano <redacted>
Sat, 16 Mar 2024 18:08:56 +0000 (11:08 -0700)
Signed-off-by: Beat Bolli <redacted>
Acked-by: Taylor Blau <redacted>
Signed-off-by: Junio C Hamano <redacted>
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
 '
 
git clone https://git.99rst.org/PROJECT