Skip to content

Commit dcf9a74

Browse files
Denton-Lgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cfe5eda commit dcf9a74

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

t/t7700-repack.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test_has_duplicate_object () {
3030
idx=$(basename $p)
3131
test "pack-$packsha1.idx" = "$idx" && continue
3232
git verify-pack -v $p >packlist || return $?
33-
if egrep "^$objsha1" packlist
33+
if grep "^$objsha1" packlist
3434
then
3535
found_duplicate_object=true
3636
echo "DUPLICATE OBJECT FOUND"
@@ -135,7 +135,7 @@ test_expect_success 'packed unreachable obs in alternate ODB are not loosened' '
135135
rm -f .git/objects/pack/* &&
136136
mv pack-* .git/objects/pack/ &&
137137
test 0 = $(git verify-pack -v -- .git/objects/pack/*.idx |
138-
egrep "^$csha1 " | sort | uniq | wc -l) &&
138+
grep "^$csha1 " | sort | uniq | wc -l) &&
139139
echo >.git/objects/info/alternates &&
140140
test_must_fail git show $csha1
141141
'
@@ -152,7 +152,7 @@ test_expect_success 'local packed unreachable obs that exist in alternate ODB ar
152152
rm -f .git/objects/pack/* &&
153153
mv pack-* .git/objects/pack/ &&
154154
test 0 = $(git verify-pack -v -- .git/objects/pack/*.idx |
155-
egrep "^$csha1 " | sort | uniq | wc -l) &&
155+
grep "^$csha1 " | sort | uniq | wc -l) &&
156156
echo >.git/objects/info/alternates &&
157157
test_must_fail git show $csha1
158158
'

0 commit comments

Comments
 (0)