tests (pack-objects): use the full, unabbreviated `--revs` option
To use the singular form of a word, when the option wants the plural form (and quietly expands it because it thinks it was abbreviated), is an easy mistake to make, and t5317 contains almost two dozen of them. However, using abbreviated options in tests is a bit fragile, so we will disallow use of abbreviated options in our test suite. In preparation for this change, let's fix `t5317-pack-objects-filter-objects.sh`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Mar 25, 2019 at 11:14 UTC
effc2bae642a08ea0cb4a9020cb57632d00ab1a0
1 file changed
+22
-22
t/t5317-pack-objects-filter-objects.sh
+22
-22
@@ -25,7 +25,7 @@ test_expect_success 'verify blob count in normal packfile' '
25
awk -f print_2.awk ls_files_result |
26
sort >expected &&
27
28
- git -C r1 pack-objects --rev --stdout >all.pack <<-EOF &&
28
+ git -C r1 pack-objects --revs --stdout >all.pack <<-EOF &&
29
HEAD
30
EOF
31
git -C r1 index-pack ../all.pack &&
@@ -39,7 +39,7 @@ test_expect_success 'verify blob count in normal packfile' '
39
'
40
41
test_expect_success 'verify blob:none packfile has no blobs' '
42
- git -C r1 pack-objects --rev --stdout --filter=blob:none >filter.pack <<-EOF &&
42
+ git -C r1 pack-objects --revs --stdout --filter=blob:none >filter.pack <<-EOF &&
43
HEAD
44
EOF
45
git -C r1 index-pack ../filter.pack &&
@@ -74,7 +74,7 @@ test_expect_success 'get an error for missing tree object' '
74
git -C r5 commit -m "foo" &&
75
del=$(git -C r5 rev-parse HEAD^{tree} | sed "s|..|&/|") &&
76
rm r5/.git/objects/$del &&
77
- test_must_fail git -C r5 pack-objects --rev --stdout 2>bad_tree <<-EOF &&
77
+ test_must_fail git -C r5 pack-objects --revs --stdout 2>bad_tree <<-EOF &&
78
HEAD
79
EOF
80
grep "bad tree object" bad_tree
@@ -88,7 +88,7 @@ test_expect_success 'setup for tests of tree:0' '
88
'
89
90
test_expect_success 'verify tree:0 packfile has no blobs or trees' '
91
- git -C r1 pack-objects --rev --stdout --filter=tree:0 >commitsonly.pack <<-EOF &&
91
+ git -C r1 pack-objects --revs --stdout --filter=tree:0 >commitsonly.pack <<-EOF &&
92
HEAD
93
EOF
94
git -C r1 index-pack ../commitsonly.pack &&
@@ -98,7 +98,7 @@ test_expect_success 'verify tree:0 packfile has no blobs or trees' '
98
99
test_expect_success 'grab tree directly when using tree:0' '
100
# We should get the tree specified directly but not its blobs or subtrees.
101
- git -C r1 pack-objects --rev --stdout --filter=tree:0 >commitsonly.pack <<-EOF &&
101
+ git -C r1 pack-objects --revs --stdout --filter=tree:0 >commitsonly.pack <<-EOF &&
102
HEAD:
103
EOF
104
git -C r1 index-pack ../commitsonly.pack &&
@@ -128,7 +128,7 @@ test_expect_success 'verify blob count in normal packfile' '
128
awk -f print_2.awk ls_files_result |
129
sort >expected &&
130
131
- git -C r2 pack-objects --rev --stdout >all.pack <<-EOF &&
131
+ git -C r2 pack-objects --revs --stdout >all.pack <<-EOF &&
132
HEAD
133
EOF
134
git -C r2 index-pack ../all.pack &&
@@ -142,7 +142,7 @@ test_expect_success 'verify blob count in normal packfile' '
142
'
143
144
test_expect_success 'verify blob:limit=500 omits all blobs' '
145
- git -C r2 pack-objects --rev --stdout --filter=blob:limit=500 >filter.pack <<-EOF &&
145
+ git -C r2 pack-objects --revs --stdout --filter=blob:limit=500 >filter.pack <<-EOF &&
146
HEAD
147
EOF
148
git -C r2 index-pack ../filter.pack &&
@@ -157,7 +157,7 @@ test_expect_success 'verify blob:limit=500 omits all blobs' '
157
'
158
159
test_expect_success 'verify blob:limit=1000' '
160
- git -C r2 pack-objects --rev --stdout --filter=blob:limit=1000 >filter.pack <<-EOF &&
160
+ git -C r2 pack-objects --revs --stdout --filter=blob:limit=1000 >filter.pack <<-EOF &&
161
HEAD
162
EOF
163
git -C r2 index-pack ../filter.pack &&
@@ -176,7 +176,7 @@ test_expect_success 'verify blob:limit=1001' '
176
awk -f print_2.awk ls_files_result |
177
sort >expected &&
178
179
- git -C r2 pack-objects --rev --stdout --filter=blob:limit=1001 >filter.pack <<-EOF &&
179
+ git -C r2 pack-objects --revs --stdout --filter=blob:limit=1001 >filter.pack <<-EOF &&
180
HEAD
181
EOF
182
git -C r2 index-pack ../filter.pack &&
@@ -194,7 +194,7 @@ test_expect_success 'verify blob:limit=10001' '
194
awk -f print_2.awk ls_files_result |
195
sort >expected &&
196
197
- git -C r2 pack-objects --rev --stdout --filter=blob:limit=10001 >filter.pack <<-EOF &&
197
+ git -C r2 pack-objects --revs --stdout --filter=blob:limit=10001 >filter.pack <<-EOF &&
198
HEAD
199
EOF
200
git -C r2 index-pack ../filter.pack &&
@@ -212,7 +212,7 @@ test_expect_success 'verify blob:limit=1k' '
212
awk -f print_2.awk ls_files_result |
213
sort >expected &&
214
215
- git -C r2 pack-objects --rev --stdout --filter=blob:limit=1k >filter.pack <<-EOF &&
215
+ git -C r2 pack-objects --revs --stdout --filter=blob:limit=1k >filter.pack <<-EOF &&
216
HEAD
217
EOF
218
git -C r2 index-pack ../filter.pack &&
@@ -230,7 +230,7 @@ test_expect_success 'verify explicitly specifying oversized blob in input' '
230
awk -f print_2.awk ls_files_result |
231
sort >expected &&
232
233
- git -C r2 pack-objects --rev --stdout --filter=blob:limit=1k >filter.pack <<-EOF &&
233
+ git -C r2 pack-objects --revs --stdout --filter=blob:limit=1k >filter.pack <<-EOF &&
234
HEAD
235
$(git -C r2 rev-parse HEAD:large.10000)
236
EOF
@@ -249,7 +249,7 @@ test_expect_success 'verify blob:limit=1m' '
249
awk -f print_2.awk ls_files_result |
250
sort >expected &&
251
252
- git -C r2 pack-objects --rev --stdout --filter=blob:limit=1m >filter.pack <<-EOF &&
252
+ git -C r2 pack-objects --revs --stdout --filter=blob:limit=1m >filter.pack <<-EOF &&
253
HEAD
254
EOF
255
git -C r2 index-pack ../filter.pack &&
@@ -302,7 +302,7 @@ test_expect_success 'verify blob count in normal packfile' '
302
awk -f print_2.awk ls_files_result |
303
sort >expected &&
304
305
- git -C r3 pack-objects --rev --stdout >all.pack <<-EOF &&
305
+ git -C r3 pack-objects --revs --stdout >all.pack <<-EOF &&
306
HEAD
307
EOF
308
git -C r3 index-pack ../all.pack &&
@@ -320,7 +320,7 @@ test_expect_success 'verify sparse:path=pattern1' '
320
awk -f print_2.awk ls_files_result |
321
sort >expected &&
322
323
- git -C r3 pack-objects --rev --stdout --filter=sparse:path=../pattern1 >filter.pack <<-EOF &&
323
+ git -C r3 pack-objects --revs --stdout --filter=sparse:path=../pattern1 >filter.pack <<-EOF &&
324
HEAD
325
EOF
326
git -C r3 index-pack ../filter.pack &&
@@ -352,7 +352,7 @@ test_expect_success 'verify sparse:path=pattern2' '
352
awk -f print_2.awk ls_files_result |
353
sort >expected &&
354
355
- git -C r3 pack-objects --rev --stdout --filter=sparse:path=../pattern2 >filter.pack <<-EOF &&
355
+ git -C r3 pack-objects --revs --stdout --filter=sparse:path=../pattern2 >filter.pack <<-EOF &&
356
HEAD
357
EOF
358
git -C r3 index-pack ../filter.pack &&
@@ -404,7 +404,7 @@ test_expect_success 'verify blob count in normal packfile' '
404
awk -f print_2.awk ls_files_result |
405
sort >expected &&
406
407
- git -C r4 pack-objects --rev --stdout >all.pack <<-EOF &&
407
+ git -C r4 pack-objects --revs --stdout >all.pack <<-EOF &&
408
HEAD
409
EOF
410
git -C r4 index-pack ../all.pack &&
@@ -423,7 +423,7 @@ test_expect_success 'verify sparse:oid=OID' '
423
sort >expected &&
424
425
oid=$(git -C r4 ls-files -s pattern | awk -f print_2.awk) &&
426
- git -C r4 pack-objects --rev --stdout --filter=sparse:oid=$oid >filter.pack <<-EOF &&
426
+ git -C r4 pack-objects --revs --stdout --filter=sparse:oid=$oid >filter.pack <<-EOF &&
427
HEAD
428
EOF
429
git -C r4 index-pack ../filter.pack &&
@@ -441,7 +441,7 @@ test_expect_success 'verify sparse:oid=oid-ish' '
441
awk -f print_2.awk ls_files_result |
442
sort >expected &&
443
444
- git -C r4 pack-objects --rev --stdout --filter=sparse:oid=master:pattern >filter.pack <<-EOF &&
444
+ git -C r4 pack-objects --revs --stdout --filter=sparse:oid=master:pattern >filter.pack <<-EOF &&
445
HEAD
446
EOF
447
git -C r4 index-pack ../filter.pack &&
@@ -470,19 +470,19 @@ test_expect_success 'setup r1 - delete loose blobs' '
470
'
471
472
test_expect_success 'verify pack-objects fails w/ missing objects' '
473
- test_must_fail git -C r1 pack-objects --rev --stdout >miss.pack <<-EOF
473
+ test_must_fail git -C r1 pack-objects --revs --stdout >miss.pack <<-EOF
474
HEAD
475
EOF
476
'
477
478
test_expect_success 'verify pack-objects fails w/ --missing=error' '
479
- test_must_fail git -C r1 pack-objects --rev --stdout --missing=error >miss.pack <<-EOF
479
+ test_must_fail git -C r1 pack-objects --revs --stdout --missing=error >miss.pack <<-EOF
480
HEAD
481
EOF
482
'
483
484
test_expect_success 'verify pack-objects w/ --missing=allow-any' '
485
- git -C r1 pack-objects --rev --stdout --missing=allow-any >miss.pack <<-EOF
485
+ git -C r1 pack-objects --revs --stdout --missing=allow-any >miss.pack <<-EOF
486
HEAD
487
EOF
488
'