summaryrefslogtreecommitdiff
path: root/t/t7700-repack.sh
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-11-27 19:53:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-11-29 21:20:15 (GMT)
commitd2eee32a8980c12be05c96e3ca84084a6234be32 (patch)
tree9114af52c7a432078d214da1731faf0c836dd359 /t/t7700-repack.sh
parent7a1c8c2346d43b4e5e5a59997288ae805a2a5019 (diff)
downloadgit-d2eee32a8980c12be05c96e3ca84084a6234be32.zip
git-d2eee32a8980c12be05c96e3ca84084a6234be32.tar.gz
git-d2eee32a8980c12be05c96e3ca84084a6234be32.tar.bz2
t7700: move keywords onto their own line
The code style for tests is to have statements on their own line if possible. Move keywords onto their own line so that they conform with the test style. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7700-repack.sh')
-rwxr-xr-xt/t7700-repack.sh51
1 files changed, 34 insertions, 17 deletions
diff --git a/t/t7700-repack.sh b/t/t7700-repack.sh
index 8936928..a96e876 100755
--- a/t/t7700-repack.sh
+++ b/t/t7700-repack.sh
@@ -29,10 +29,12 @@ test_expect_success 'objects in packs marked .keep are not repacked' '
mv pack-* .git/objects/pack/ &&
git repack -A -d -l &&
git prune-packed &&
- for p in .git/objects/pack/*.idx; do
+ for p in .git/objects/pack/*.idx
+ do
idx=$(basename $p)
test "pack-$packsha1.idx" = "$idx" && continue
- if git verify-pack -v $p | egrep "^$objsha1"; then
+ if git verify-pack -v $p | egrep "^$objsha1"
+ then
found_duplicate_object=1
echo "DUPLICATE OBJECT FOUND"
break
@@ -45,10 +47,12 @@ test_expect_success 'writing bitmaps via command-line can duplicate .keep object
# build on $objsha1, $packsha1, and .keep state from previous
git repack -Adbl &&
test_when_finished "found_duplicate_object=" &&
- for p in .git/objects/pack/*.idx; do
+ for p in .git/objects/pack/*.idx
+ do
idx=$(basename $p)
test "pack-$packsha1.idx" = "$idx" && continue
- if git verify-pack -v $p | egrep "^$objsha1"; then
+ if git verify-pack -v $p | egrep "^$objsha1"
+ then
found_duplicate_object=1
echo "DUPLICATE OBJECT FOUND"
break
@@ -61,10 +65,12 @@ test_expect_success 'writing bitmaps via config can duplicate .keep objects' '
# build on $objsha1, $packsha1, and .keep state from previous
git -c repack.writebitmaps=true repack -Adl &&
test_when_finished "found_duplicate_object=" &&
- for p in .git/objects/pack/*.idx; do
+ for p in .git/objects/pack/*.idx
+ do
idx=$(basename $p)
test "pack-$packsha1.idx" = "$idx" && continue
- if git verify-pack -v $p | egrep "^$objsha1"; then
+ if git verify-pack -v $p | egrep "^$objsha1"
+ then
found_duplicate_object=1
echo "DUPLICATE OBJECT FOUND"
break
@@ -83,8 +89,10 @@ test_expect_success 'loose objects in alternate ODB are not repacked' '
git commit -m commit_file3 &&
git repack -a -d -l &&
git prune-packed &&
- for p in .git/objects/pack/*.idx; do
- if git verify-pack -v $p | egrep "^$objsha1"; then
+ for p in .git/objects/pack/*.idx
+ do
+ if git verify-pack -v $p | egrep "^$objsha1"
+ then
found_duplicate_object=1
echo "DUPLICATE OBJECT FOUND"
break
@@ -99,10 +107,13 @@ test_expect_success 'packed obs in alt ODB are repacked even when local repo is
git repack -a &&
myidx=$(ls -1 .git/objects/pack/*.idx) &&
test -f "$myidx" &&
- for p in alt_objects/pack/*.idx; do
+ for p in alt_objects/pack/*.idx
+ do
git verify-pack -v $p | sed -n -e "/^[0-9a-f]\{40\}/p"
- done | while read sha1 rest; do
- if ! ( git verify-pack -v $myidx | grep "^$sha1" ); then
+ done | while read sha1 rest
+ do
+ if ! ( git verify-pack -v $myidx | grep "^$sha1" )
+ then
echo "Missing object in local pack: $sha1"
return 1
fi
@@ -119,10 +130,13 @@ test_expect_success 'packed obs in alt ODB are repacked when local repo has pack
git repack -a -d &&
myidx=$(ls -1 .git/objects/pack/*.idx) &&
test -f "$myidx" &&
- for p in alt_objects/pack/*.idx; do
+ for p in alt_objects/pack/*.idx
+ do
git verify-pack -v $p | sed -n -e "/^[0-9a-f]\{40\}/p"
- done | while read sha1 rest; do
- if ! ( git verify-pack -v $myidx | grep "^$sha1" ); then
+ done | while read sha1 rest
+ do
+ if ! ( git verify-pack -v $myidx | grep "^$sha1" )
+ then
echo "Missing object in local pack: $sha1"
return 1
fi
@@ -144,10 +158,13 @@ test_expect_success 'packed obs in alternate ODB kept pack are repacked' '
git repack -a -d &&
myidx=$(ls -1 .git/objects/pack/*.idx) &&
test -f "$myidx" &&
- for p in alt_objects/pack/*.idx; do
+ for p in alt_objects/pack/*.idx
+ do
git verify-pack -v $p | sed -n -e "/^[0-9a-f]\{40\}/p"
- done | while read sha1 rest; do
- if ! ( git verify-pack -v $myidx | grep "^$sha1" ); then
+ done | while read sha1 rest
+ do
+ if ! ( git verify-pack -v $myidx | grep "^$sha1" )
+ then
echo "Missing object in local pack: $sha1"
return 1
fi