@matheusbsbs / matheus-bagliano / commits / e892a56845
Fork 0

t5319: replace 'touch -m' with 'test-tool chmtime'

The use of 'touch -m' to modify a file's mtime is slightly less portable than using our own 'test-tool chmtime'. The important thing is that these pack-files are ordered in a special way to ensure the multi-pack-index selects some as the "newer" pack-files when resolving duplicate objects. Reported-by: Jeff King <peff@peff.net> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Derrick Stolee committed Apr 1, 2020 at 21:00 UTC e892a56845dfc806e384574884175dea964b359c
1 file changed +4 -4
t/t5319-multi-pack-index.sh
+4 -4
@@ -438,10 +438,10 @@ test_expect_success 'repack with minimum size does not alter existing packs' '
438 cd dup &&
439 rm -rf .git/objects/pack &&
440 mv .git/objects/pack-backup .git/objects/pack &&
441 - touch -m -t 201901010000 .git/objects/pack/pack-D* &&
442 - touch -m -t 201901010001 .git/objects/pack/pack-C* &&
443 - touch -m -t 201901010002 .git/objects/pack/pack-B* &&
444 - touch -m -t 201901010003 .git/objects/pack/pack-A* &&
441 + test-tool chmtime =-5 .git/objects/pack/pack-D* &&
442 + test-tool chmtime =-4 .git/objects/pack/pack-C* &&
443 + test-tool chmtime =-3 .git/objects/pack/pack-B* &&
444 + test-tool chmtime =-2 .git/objects/pack/pack-A* &&
445 ls .git/objects/pack >expect &&
446 MINSIZE=$(test-tool path-utils file-size .git/objects/pack/*pack | sort -n | head -n 1) &&
447 git multi-pack-index repack --batch-size=$MINSIZE &&