@@ -384,99 +384,106 @@ title "gix pack"
384384 }
385385 )
386386 (with " a valid pack INDEX file"
387- PACK_INDEX_FILE =" $fixtures /packs/pack-11fdfa9e156ab73caae3b6da867192221f2089c2.idx"
387+ MULTI_PACK_INDEX =" $fixtures /packs/pack-11fdfa9e156ab73caae3b6da867192221f2089c2.idx"
388388 (with " no statistics"
389389 it " verifies the pack index successfully and with desired output" && {
390390 WITH_SNAPSHOT=" $snapshot /index-success" \
391- expect_run $SUCCESSFULLY " $exe_plumbing " pack verify " $PACK_INDEX_FILE "
391+ expect_run $SUCCESSFULLY " $exe_plumbing " pack verify " $MULTI_PACK_INDEX "
392392 }
393393 )
394394 (with " statistics"
395395 it " verifies the pack index successfully and with desired output" && {
396396 WITH_SNAPSHOT=" $snapshot /index-with-statistics-success" \
397- expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --statistics " $PACK_INDEX_FILE "
397+ expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --statistics " $MULTI_PACK_INDEX "
398398 }
399399
400400 (with " and the less-memory algorithm"
401401 it " verifies the pack index successfully and with desired output" && {
402402 WITH_SNAPSHOT=" $snapshot /index-with-statistics-success" \
403- expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --algorithm less-memory --statistics " $PACK_INDEX_FILE "
403+ expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --algorithm less-memory --statistics " $MULTI_PACK_INDEX "
404404 }
405405 )
406406 )
407407 (with " decode"
408408 it " verifies the pack index successfully and with desired output, and decodes all objects" && {
409409 WITH_SNAPSHOT=" $snapshot /index-success" \
410- expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --algorithm less-memory --decode " $PACK_INDEX_FILE "
410+ expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --algorithm less-memory --decode " $MULTI_PACK_INDEX "
411411 }
412412 )
413413 (with " re-encode"
414414 it " verifies the pack index successfully and with desired output, and re-encodes all objects" && {
415415 WITH_SNAPSHOT=" $snapshot /index-success" \
416- expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --algorithm less-time --re-encode " $PACK_INDEX_FILE "
416+ expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --algorithm less-time --re-encode " $MULTI_PACK_INDEX "
417417 }
418418 )
419419 if test " $kind " = " max" ; then
420420 (with " statistics (JSON)"
421421 it " verifies the pack index successfully and with desired output" && {
422422 WITH_SNAPSHOT=" $snapshot /index-with-statistics-json-success" \
423- expect_run $SUCCESSFULLY " $exe_plumbing " --format json --threads 1 pack verify --statistics " $PACK_INDEX_FILE "
423+ expect_run $SUCCESSFULLY " $exe_plumbing " --format json --threads 1 pack verify --statistics " $MULTI_PACK_INDEX "
424424 }
425425 )
426426 fi
427427 )
428428 (with " a valid multi-pack index"
429429 snapshot=" $snapshot /multi-index"
430430 (sandbox
431- PACK_INDEX_FILE =multi-pack-index
431+ MULTI_PACK_INDEX =multi-pack-index
432432 cp $fixtures /packs/pack-* .
433- $exe_plumbing pack multi-index create * .idx -o $PACK_INDEX_FILE
433+ $exe_plumbing pack multi-index create * .idx -o $MULTI_PACK_INDEX
434+
435+ (when " using fast validation via 'pack multi-index verify'"
436+ it " verifies the pack index successfully and with desired output" && {
437+ WITH_SNAPSHOT=" $snapshot /fast-index-success" \
438+ expect_run $SUCCESSFULLY " $exe_plumbing " pack multi-index verify " $MULTI_PACK_INDEX "
439+ }
440+ )
434441
435442 (with " no statistics"
436443 it " verifies the pack index successfully and with desired output" && {
437444 WITH_SNAPSHOT=" $snapshot /index-success" \
438- expect_run $SUCCESSFULLY " $exe_plumbing " pack verify " $PACK_INDEX_FILE "
445+ expect_run $SUCCESSFULLY " $exe_plumbing " pack verify " $MULTI_PACK_INDEX "
439446 }
440447 )
441448 (with " statistics"
442449 it " verifies the pack index successfully and with desired output" && {
443450 WITH_SNAPSHOT=" $snapshot /index-with-statistics-success" \
444- expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --statistics " $PACK_INDEX_FILE "
451+ expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --statistics " $MULTI_PACK_INDEX "
445452 }
446453
447454 (with " and the less-memory algorithm"
448455 it " verifies the pack index successfully and with desired output" && {
449456 WITH_SNAPSHOT=" $snapshot /index-with-statistics-success" \
450- expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --algorithm less-memory --statistics " $PACK_INDEX_FILE "
457+ expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --algorithm less-memory --statistics " $MULTI_PACK_INDEX "
451458 }
452459 )
453460 )
454461 (with " decode"
455462 it " verifies the pack index successfully and with desired output, and decodes all objects" && {
456463 WITH_SNAPSHOT=" $snapshot /index-success" \
457- expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --algorithm less-memory --decode " $PACK_INDEX_FILE "
464+ expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --algorithm less-memory --decode " $MULTI_PACK_INDEX "
458465 }
459466 )
460467 (with " re-encode"
461468 it " verifies the pack index successfully and with desired output, and re-encodes all objects" && {
462469 WITH_SNAPSHOT=" $snapshot /index-success" \
463- expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --algorithm less-time --re-encode " $PACK_INDEX_FILE "
470+ expect_run $SUCCESSFULLY " $exe_plumbing " pack verify --algorithm less-time --re-encode " $MULTI_PACK_INDEX "
464471 }
465472 )
466473 if test " $kind " = " max" ; then
467474 (with " statistics (JSON)"
468475 it " verifies the pack index successfully and with desired output" && {
469476 WITH_SNAPSHOT=" $snapshot /index-with-statistics-json-success" \
470- expect_run $SUCCESSFULLY " $exe_plumbing " --format json --threads 1 pack verify --statistics " $PACK_INDEX_FILE "
477+ expect_run $SUCCESSFULLY " $exe_plumbing " --format json --threads 1 pack verify --statistics " $MULTI_PACK_INDEX "
471478 }
472479 )
473480 fi
474481 )
475482 )
476483 (sandbox
477484 (with " an INvalid pack INDEX file"
478- PACK_INDEX_FILE =" $fixtures /packs/pack-11fdfa9e156ab73caae3b6da867192221f2089c2.idx"
479- cp $PACK_INDEX_FILE index.idx
485+ MULTI_PACK_INDEX =" $fixtures /packs/pack-11fdfa9e156ab73caae3b6da867192221f2089c2.idx"
486+ cp $MULTI_PACK_INDEX index.idx
480487 echo $' \0' >> index.idx
481488 it " fails to verify the pack index and with desired output" && {
482489 WITH_SNAPSHOT=" $snapshot /index-failure" \
0 commit comments