Git fork

t/t7704-repack-cruft.sh: clarify wording in --max-cruft-size tests

Now that a number of new tests have landed in t7704, make sure that they
all make sense and are testing the things they say they are.

Things are mostly OK, but a handful of tests needed tweaks. Those tweaks
are as follows:

- Use the terms "too large" or "too small" in tests that exercise the
'--max-cruft-size' behavior. This has historically been treated as a
threshold beneath which to combine cruft packs, but that will change
in a subsequent commit. Prepare for that by using a more generic
term.

- Remove references to "--max-cruft-size" in the freshening tests.
These tests provide coverage of our ability to record updated mtimes
for objects already in cruft packs whose mtimes are upserted from
various sources (loose objects, finding that object in a new pack,
another cruft pack, etc.).

These have nothing to do with the '--max-cruft-size' feature, and in
fact none of the tests even *use* '--max-cruft-size'. Name them
appropriately to make it clear that these tests exercise freshening
behavior, not '--max-cruft-size' behavior.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Acked-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Taylor Blau and committed by
Junio C Hamano
1b01b03e cee95f26

+10 -10
+10 -10
t/t7704-repack-cruft.sh
··· 149 echo "$packdir/pack-$pack.mtimes" 150 } 151 152 - test_expect_success '--max-cruft-size creates new packs when above threshold' ' 153 git init max-cruft-size-large && 154 ( 155 cd max-cruft-size-large && ··· 173 ) 174 ' 175 176 - test_expect_success '--max-cruft-size combines existing packs when below threshold' ' 177 git init max-cruft-size-small && 178 ( 179 cd max-cruft-size-small && ··· 236 ) 237 ' 238 239 - test_expect_success 'setup --max-cruft-size with freshened objects' ' 240 - git init max-cruft-size-freshen && 241 ( 242 - cd max-cruft-size-freshen && 243 244 test_commit base && 245 git repack -ad && ··· 257 ) 258 ' 259 260 - test_expect_success '--max-cruft-size with freshened objects (loose)' ' 261 ( 262 - cd max-cruft-size-freshen && 263 264 # regenerate the object, setting its mtime to be more recent 265 foo="$(generate_random_blob foo 64)" && ··· 275 ) 276 ' 277 278 - test_expect_success '--max-cruft-size with freshened objects (packed)' ' 279 ( 280 - cd max-cruft-size-freshen && 281 282 # regenerate the object and store it in a packfile, 283 # setting its mtime to be more recent ··· 304 ) 305 ' 306 307 - test_expect_success '--max-cruft-size with freshened objects (previously cruft)' ' 308 repo="max-cruft-size-threshold" && 309 310 test_when_finished "rm -fr $repo" &&
··· 149 echo "$packdir/pack-$pack.mtimes" 150 } 151 152 + test_expect_success '--max-cruft-size creates new packs when too large' ' 153 git init max-cruft-size-large && 154 ( 155 cd max-cruft-size-large && ··· 173 ) 174 ' 175 176 + test_expect_success '--max-cruft-size combines existing packs when not too large' ' 177 git init max-cruft-size-small && 178 ( 179 cd max-cruft-size-small && ··· 236 ) 237 ' 238 239 + test_expect_success 'setup cruft with freshened objects' ' 240 + git init cruft-freshen && 241 ( 242 + cd cruft-freshen && 243 244 test_commit base && 245 git repack -ad && ··· 257 ) 258 ' 259 260 + test_expect_success 'cruft with freshened objects (loose)' ' 261 ( 262 + cd cruft-freshen && 263 264 # regenerate the object, setting its mtime to be more recent 265 foo="$(generate_random_blob foo 64)" && ··· 275 ) 276 ' 277 278 + test_expect_success 'cruft with freshened objects (packed)' ' 279 ( 280 + cd cruft-freshen && 281 282 # regenerate the object and store it in a packfile, 283 # setting its mtime to be more recent ··· 304 ) 305 ' 306 307 + test_expect_success 'multi-cruft with freshened objects (previously cruft)' ' 308 repo="max-cruft-size-threshold" && 309 310 test_when_finished "rm -fr $repo" &&