@@ -39,6 +39,8 @@ relationship between packs and objects is as follows:
39
39
master_repo=master.git
40
40
shared_repo=shared.git
41
41
42
+ git_pack_redundant=' git pack-redundant --i-still-use-this'
43
+
42
44
# Create commits in <repo> and assign each commit's oid to shell variables
43
45
# given in the arguments (A, B, and C). E.g.:
44
46
#
@@ -154,7 +156,7 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '
154
156
EOF
155
157
(
156
158
cd "$master_repo" &&
157
- git pack-redundant --all >out &&
159
+ $git_pack_redundant --all >out &&
158
160
test_must_be_empty out
159
161
)
160
162
'
@@ -192,7 +194,7 @@ test_expect_success 'master: one of pack-2/pack-3 is redundant' '
192
194
cat >expect <<-EOF &&
193
195
P3:$P3
194
196
EOF
195
- git pack-redundant --all >out &&
197
+ $git_pack_redundant --all >out &&
196
198
format_packfiles <out >actual &&
197
199
test_cmp expect actual
198
200
)
@@ -231,7 +233,7 @@ test_expect_success 'master: pack 2, 4, and 6 are redundant' '
231
233
P4:$P4
232
234
P6:$P6
233
235
EOF
234
- git pack-redundant --all >out &&
236
+ $git_pack_redundant --all >out &&
235
237
format_packfiles <out >actual &&
236
238
test_cmp expect actual
237
239
)
@@ -266,7 +268,7 @@ test_expect_success 'master: pack-8 (subset of pack-1) is also redundant' '
266
268
P6:$P6
267
269
P8:$P8
268
270
EOF
269
- git pack-redundant --all >out &&
271
+ $git_pack_redundant --all >out &&
270
272
format_packfiles <out >actual &&
271
273
test_cmp expect actual
272
274
)
@@ -284,9 +286,9 @@ test_expect_success 'master: clean loose objects' '
284
286
test_expect_success ' master: remove redundant packs and pass fsck' '
285
287
(
286
288
cd "$master_repo" &&
287
- git pack-redundant --all | xargs rm &&
289
+ $git_pack_redundant --all | xargs rm &&
288
290
git fsck &&
289
- git pack-redundant --all >out &&
291
+ $git_pack_redundant --all >out &&
290
292
test_must_be_empty out
291
293
)
292
294
'
@@ -304,7 +306,7 @@ test_expect_success 'setup shared.git' '
304
306
test_expect_success ' shared: all packs are redundant, but no output without --alt-odb' '
305
307
(
306
308
cd "$shared_repo" &&
307
- git pack-redundant --all >out &&
309
+ $git_pack_redundant --all >out &&
308
310
test_must_be_empty out
309
311
)
310
312
'
@@ -343,7 +345,7 @@ test_expect_success 'shared: show redundant packs in stderr for verbose mode' '
343
345
P5:$P5
344
346
P7:$P7
345
347
EOF
346
- git pack-redundant --all --verbose >out 2>out.err &&
348
+ $git_pack_redundant --all --verbose >out 2>out.err &&
347
349
test_must_be_empty out &&
348
350
grep "pack$" out.err | format_packfiles >actual &&
349
351
test_cmp expect actual
@@ -356,9 +358,9 @@ test_expect_success 'shared: remove redundant packs, no packs left' '
356
358
cat >expect <<-EOF &&
357
359
fatal: Zero packs found!
358
360
EOF
359
- git pack-redundant --all --alt-odb | xargs rm &&
361
+ $git_pack_redundant --all --alt-odb | xargs rm &&
360
362
git fsck &&
361
- test_must_fail git pack-redundant --all --alt-odb >actual 2>&1 &&
363
+ test_must_fail $git_pack_redundant --all --alt-odb >actual 2>&1 &&
362
364
test_cmp expect actual
363
365
)
364
366
'
@@ -386,7 +388,7 @@ test_expect_success 'shared: create new objects and packs' '
386
388
test_expect_success ' shared: no redundant without --alt-odb' '
387
389
(
388
390
cd "$shared_repo" &&
389
- git pack-redundant --all >out &&
391
+ $git_pack_redundant --all >out &&
390
392
test_must_be_empty out
391
393
)
392
394
'
@@ -417,7 +419,7 @@ test_expect_success 'shared: no redundant without --alt-odb' '
417
419
test_expect_success ' shared: one pack is redundant with --alt-odb' '
418
420
(
419
421
cd "$shared_repo" &&
420
- git pack-redundant --all --alt-odb >out &&
422
+ $git_pack_redundant --all --alt-odb >out &&
421
423
format_packfiles <out >actual &&
422
424
test_line_count = 1 actual
423
425
)
@@ -454,7 +456,7 @@ test_expect_success 'shared: ignore unique objects and all two packs are redunda
454
456
Px1:$Px1
455
457
Px2:$Px2
456
458
EOF
457
- git pack-redundant --all --alt-odb >out <<-EOF &&
459
+ $git_pack_redundant --all --alt-odb >out <<-EOF &&
458
460
$X
459
461
$Y
460
462
$Z
0 commit comments