@@ -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
#
@@ -118,7 +120,7 @@ test_expect_success 'master: pack-redundant works with no packfile' '
118
120
cat >expect <<-EOF &&
119
121
fatal: Zero packs found!
120
122
EOF
121
- test_must_fail git pack-redundant --all >actual 2>&1 &&
123
+ test_must_fail $git_pack_redundant --all >actual 2>&1 &&
122
124
test_cmp expect actual
123
125
)
124
126
'
@@ -146,7 +148,7 @@ test_expect_success 'master: pack-redundant works with one packfile' '
146
148
EOF
147
149
(
148
150
cd "$master_repo" &&
149
- git pack-redundant --all >out &&
151
+ $git_pack_redundant --all >out &&
150
152
test_must_be_empty out
151
153
)
152
154
'
@@ -183,7 +185,7 @@ test_expect_success 'master: no redundant for pack 1, 2, 3' '
183
185
EOF
184
186
(
185
187
cd "$master_repo" &&
186
- git pack-redundant --all >out &&
188
+ $git_pack_redundant --all >out &&
187
189
test_must_be_empty out
188
190
)
189
191
'
@@ -221,7 +223,7 @@ test_expect_success 'master: one of pack-2/pack-3 is redundant' '
221
223
cat >expect <<-EOF &&
222
224
P3:$P3
223
225
EOF
224
- git pack-redundant --all >out &&
226
+ $git_pack_redundant --all >out &&
225
227
format_packfiles <out >actual &&
226
228
test_cmp expect actual
227
229
)
@@ -260,7 +262,7 @@ test_expect_success 'master: pack 2, 4, and 6 are redundant' '
260
262
P4:$P4
261
263
P6:$P6
262
264
EOF
263
- git pack-redundant --all >out &&
265
+ $git_pack_redundant --all >out &&
264
266
format_packfiles <out >actual &&
265
267
test_cmp expect actual
266
268
)
@@ -295,7 +297,7 @@ test_expect_success 'master: pack-8 (subset of pack-1) is also redundant' '
295
297
P6:$P6
296
298
P8:$P8
297
299
EOF
298
- git pack-redundant --all >out &&
300
+ $git_pack_redundant --all >out &&
299
301
format_packfiles <out >actual &&
300
302
test_cmp expect actual
301
303
)
@@ -313,9 +315,9 @@ test_expect_success 'master: clean loose objects' '
313
315
test_expect_success ' master: remove redundant packs and pass fsck' '
314
316
(
315
317
cd "$master_repo" &&
316
- git pack-redundant --all | xargs rm &&
318
+ $git_pack_redundant --all | xargs rm &&
317
319
git fsck &&
318
- git pack-redundant --all >out &&
320
+ $git_pack_redundant --all >out &&
319
321
test_must_be_empty out
320
322
)
321
323
'
@@ -333,7 +335,7 @@ test_expect_success 'setup shared.git' '
333
335
test_expect_success ' shared: all packs are redundant, but no output without --alt-odb' '
334
336
(
335
337
cd "$shared_repo" &&
336
- git pack-redundant --all >out &&
338
+ $git_pack_redundant --all >out &&
337
339
test_must_be_empty out
338
340
)
339
341
'
@@ -372,7 +374,7 @@ test_expect_success 'shared: show redundant packs in stderr for verbose mode' '
372
374
P5:$P5
373
375
P7:$P7
374
376
EOF
375
- git pack-redundant --all --verbose >out 2>out.err &&
377
+ $git_pack_redundant --all --verbose >out 2>out.err &&
376
378
test_must_be_empty out &&
377
379
grep "pack$" out.err | format_packfiles >actual &&
378
380
test_cmp expect actual
@@ -385,9 +387,9 @@ test_expect_success 'shared: remove redundant packs, no packs left' '
385
387
cat >expect <<-EOF &&
386
388
fatal: Zero packs found!
387
389
EOF
388
- git pack-redundant --all --alt-odb | xargs rm &&
390
+ $git_pack_redundant --all --alt-odb | xargs rm &&
389
391
git fsck &&
390
- test_must_fail git pack-redundant --all --alt-odb >actual 2>&1 &&
392
+ test_must_fail $git_pack_redundant --all --alt-odb >actual 2>&1 &&
391
393
test_cmp expect actual
392
394
)
393
395
'
@@ -415,7 +417,7 @@ test_expect_success 'shared: create new objects and packs' '
415
417
test_expect_success ' shared: no redundant without --alt-odb' '
416
418
(
417
419
cd "$shared_repo" &&
418
- git pack-redundant --all >out &&
420
+ $git_pack_redundant --all >out &&
419
421
test_must_be_empty out
420
422
)
421
423
'
@@ -446,7 +448,7 @@ test_expect_success 'shared: no redundant without --alt-odb' '
446
448
test_expect_success ' shared: one pack is redundant with --alt-odb' '
447
449
(
448
450
cd "$shared_repo" &&
449
- git pack-redundant --all --alt-odb >out &&
451
+ $git_pack_redundant --all --alt-odb >out &&
450
452
format_packfiles <out >actual &&
451
453
test_line_count = 1 actual
452
454
)
@@ -483,7 +485,7 @@ test_expect_success 'shared: ignore unique objects and all two packs are redunda
483
485
Px1:$Px1
484
486
Px2:$Px2
485
487
EOF
486
- git pack-redundant --all --alt-odb >out <<-EOF &&
488
+ $git_pack_redundant --all --alt-odb >out <<-EOF &&
487
489
$X
488
490
$Y
489
491
$Z
0 commit comments