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:

committed by
Junio C Hamano

parent
8a3c5ccc4d
commit
67dd07e8af
@ -97,7 +97,7 @@ test_expect_success 'branch: --verbose works with messages using CRLF' '
|
|||||||
git branch -v >tmp &&
|
git branch -v >tmp &&
|
||||||
# Remove first two columns, and the line for the currently checked out branch
|
# Remove first two columns, and the line for the currently checked out branch
|
||||||
current=$(git branch --show-current) &&
|
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
|
test_cmp expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user