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>
Denton Liu committed
Nov 27, 2019 at 11:53 UTC
d2eee32a8980c12be05c96e3ca84084a6234be32
1 file changed
+34
-17
t/t7700-repack.sh
+34
-17
@@ -29,10 +29,12 @@ test_expect_success 'objects in packs marked .keep are not repacked' '
29
mv pack-* .git/objects/pack/ &&
30
git repack -A -d -l &&
31
git prune-packed &&
32
- for p in .git/objects/pack/*.idx; do
32
+ for p in .git/objects/pack/*.idx
33
+ do
34
idx=$(basename $p)
35
test "pack-$packsha1.idx" = "$idx" && continue
35
- if git verify-pack -v $p | egrep "^$objsha1"; then
36
+ if git verify-pack -v $p | egrep "^$objsha1"
37
+ then
38
found_duplicate_object=1
39
echo "DUPLICATE OBJECT FOUND"
40
break
@@ -45,10 +47,12 @@ test_expect_success 'writing bitmaps via command-line can duplicate .keep object
47
# build on $objsha1, $packsha1, and .keep state from previous
48
git repack -Adbl &&
49
test_when_finished "found_duplicate_object=" &&
48
- for p in .git/objects/pack/*.idx; do
50
+ for p in .git/objects/pack/*.idx
51
+ do
52
idx=$(basename $p)
53
test "pack-$packsha1.idx" = "$idx" && continue
51
- if git verify-pack -v $p | egrep "^$objsha1"; then
54
+ if git verify-pack -v $p | egrep "^$objsha1"
55
+ then
56
found_duplicate_object=1
57
echo "DUPLICATE OBJECT FOUND"
58
break
@@ -61,10 +65,12 @@ test_expect_success 'writing bitmaps via config can duplicate .keep objects' '
65
# build on $objsha1, $packsha1, and .keep state from previous
66
git -c repack.writebitmaps=true repack -Adl &&
67
test_when_finished "found_duplicate_object=" &&
64
- for p in .git/objects/pack/*.idx; do
68
+ for p in .git/objects/pack/*.idx
69
+ do
70
idx=$(basename $p)
71
test "pack-$packsha1.idx" = "$idx" && continue
67
- if git verify-pack -v $p | egrep "^$objsha1"; then
72
+ if git verify-pack -v $p | egrep "^$objsha1"
73
+ then
74
found_duplicate_object=1
75
echo "DUPLICATE OBJECT FOUND"
76
break
@@ -83,8 +89,10 @@ test_expect_success 'loose objects in alternate ODB are not repacked' '
89
git commit -m commit_file3 &&
90
git repack -a -d -l &&
91
git prune-packed &&
86
- for p in .git/objects/pack/*.idx; do
87
- if git verify-pack -v $p | egrep "^$objsha1"; then
92
+ for p in .git/objects/pack/*.idx
93
+ do
94
+ if git verify-pack -v $p | egrep "^$objsha1"
95
+ then
96
found_duplicate_object=1
97
echo "DUPLICATE OBJECT FOUND"
98
break
@@ -99,10 +107,13 @@ test_expect_success 'packed obs in alt ODB are repacked even when local repo is
107
git repack -a &&
108
myidx=$(ls -1 .git/objects/pack/*.idx) &&
109
test -f "$myidx" &&
102
- for p in alt_objects/pack/*.idx; do
110
+ for p in alt_objects/pack/*.idx
111
+ do
112
git verify-pack -v $p | sed -n -e "/^[0-9a-f]\{40\}/p"
104
- done | while read sha1 rest; do
105
- if ! ( git verify-pack -v $myidx | grep "^$sha1" ); then
113
+ done | while read sha1 rest
114
+ do
115
+ if ! ( git verify-pack -v $myidx | grep "^$sha1" )
116
+ then
117
echo "Missing object in local pack: $sha1"
118
return 1
119
fi
@@ -119,10 +130,13 @@ test_expect_success 'packed obs in alt ODB are repacked when local repo has pack
130
git repack -a -d &&
131
myidx=$(ls -1 .git/objects/pack/*.idx) &&
132
test -f "$myidx" &&
122
- for p in alt_objects/pack/*.idx; do
133
+ for p in alt_objects/pack/*.idx
134
+ do
135
git verify-pack -v $p | sed -n -e "/^[0-9a-f]\{40\}/p"
124
- done | while read sha1 rest; do
125
- if ! ( git verify-pack -v $myidx | grep "^$sha1" ); then
136
+ done | while read sha1 rest
137
+ do
138
+ if ! ( git verify-pack -v $myidx | grep "^$sha1" )
139
+ then
140
echo "Missing object in local pack: $sha1"
141
return 1
142
fi
@@ -144,10 +158,13 @@ test_expect_success 'packed obs in alternate ODB kept pack are repacked' '
158
git repack -a -d &&
159
myidx=$(ls -1 .git/objects/pack/*.idx) &&
160
test -f "$myidx" &&
147
- for p in alt_objects/pack/*.idx; do
161
+ for p in alt_objects/pack/*.idx
162
+ do
163
git verify-pack -v $p | sed -n -e "/^[0-9a-f]\{40\}/p"
149
- done | while read sha1 rest; do
150
- if ! ( git verify-pack -v $myidx | grep "^$sha1" ); then
164
+ done | while read sha1 rest
165
+ do
166
+ if ! ( git verify-pack -v $myidx | grep "^$sha1" )
167
+ then
168
echo "Missing object in local pack: $sha1"
169
return 1
170
fi