@matheusbsbs / matheus-bagliano / commits / dcf9a748ca
Fork 0

t7700: replace egrep with grep

The egrep expressions in this test suite were of the form `^$variable`. Although egrep works just fine, it's overkill since we're not using any extended regex. Replace egrep invocations with grep so that we aren't swatting flies with a sledgehammer. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Denton Liu committed Dec 4, 2019 at 14:03 UTC dcf9a748cabedd6353d411eb5119fbe7fdda6ff5
1 file changed +3 -3
t/t7700-repack.sh
+3 -3
@@ -30,7 +30,7 @@ test_has_duplicate_object () {
30 idx=$(basename $p)
31 test "pack-$packsha1.idx" = "$idx" && continue
32 git verify-pack -v $p >packlist || return $?
33 - if egrep "^$objsha1" packlist
33 + if grep "^$objsha1" packlist
34 then
35 found_duplicate_object=true
36 echo "DUPLICATE OBJECT FOUND"
@@ -135,7 +135,7 @@ test_expect_success 'packed unreachable obs in alternate ODB are not loosened' '
135 rm -f .git/objects/pack/* &&
136 mv pack-* .git/objects/pack/ &&
137 test 0 = $(git verify-pack -v -- .git/objects/pack/*.idx |
138 - egrep "^$csha1 " | sort | uniq | wc -l) &&
138 + grep "^$csha1 " | sort | uniq | wc -l) &&
139 echo >.git/objects/info/alternates &&
140 test_must_fail git show $csha1
141 '
@@ -152,7 +152,7 @@ test_expect_success 'local packed unreachable obs that exist in alternate ODB ar
152 rm -f .git/objects/pack/* &&
153 mv pack-* .git/objects/pack/ &&
154 test 0 = $(git verify-pack -v -- .git/objects/pack/*.idx |
155 - egrep "^$csha1 " | sort | uniq | wc -l) &&
155 + grep "^$csha1 " | sort | uniq | wc -l) &&
156 echo >.git/objects/info/alternates &&
157 test_must_fail git show $csha1
158 '