From: Derrick Stolee <derrickstolee@xxxxxxxxxx> Replace a 'git repack --cruft -d' with the wrapper 'git gc --cruft' to exercise some logic in builtin/gc.c that adds the '--cruft' option to the underlying 'git repack' command. Signed-off-by: Derrick Stolee <derrickstolee@xxxxxxxxxx> --- t/t5329-pack-objects-cruft.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/t5329-pack-objects-cruft.sh b/t/t5329-pack-objects-cruft.sh index b481224b93d..55bb9c0e7b5 100755 --- a/t/t5329-pack-objects-cruft.sh +++ b/t/t5329-pack-objects-cruft.sh @@ -451,11 +451,13 @@ test_expect_success 'expiring cruft objects with git gc' ' sort <reachable.raw >reachable && comm -13 reachable objects >unreachable && - git repack --cruft -d && + # Write a cruft pack instead of deleting files. + git gc --cruft && mtimes=$(ls .git/objects/pack/pack-*.mtimes) && test_path_is_file $mtimes && + # Ignore the cruft pack and delete every unreachable object. git gc --cruft --prune=now && git cat-file --batch-all-objects --batch-check="%(objectname)" >objects && -- gitgitgadget