t7900: speed up expensive test

A test marked with EXPENSIVE creates two 2.5GB files and adds them to the repository. This takes 194s to run on my machine, versus 2s when the EXPENSIVE prereq isn't set. We can trim this down a bit by doing two things: - use "git commit --quiet" to avoid spending time generating a diff summary (this actually only helps for the second commit, but I've added it here to both for consistency). This shaves off 8s. - set core.compression to 0. We know these files are full of random bytes, and so won't compress (that's the point of the test!). Spending cycles on zlib is pointless. This shaves off 122s. After this, my total time to run the script is 64s. That won't help normal runs without GIT_TEST_LONG set, of course, but it's easy enough to do. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Dec 1, 2020 at 21:47 UTC a0c5ccc1c01597821a8ec09a359f4522bdd55807
1 file changed +4 -2
t/t7900-maintenance.sh
+4 -2
@@ -189,13 +189,15 @@ test_expect_success 'incremental-repack task' '
189 '
190
191 test_expect_success EXPENSIVE 'incremental-repack 2g limit' '
192 + test_config core.compression 0 &&
193 +
194 for i in $(test_seq 1 5)
195 do
196 test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
197 return 1
198 done &&
199 git add big &&
198 - git commit -m "Add big file (1)" &&
200 + git commit -qm "Add big file (1)" &&
201
202 # ensure any possible loose objects are in a pack-file
203 git maintenance run --task=loose-objects &&
@@ -207,7 +209,7 @@ test_expect_success EXPENSIVE 'incremental-repack 2g limit' '
209 return 1
210 done &&
211 git add big &&
210 - git commit -m "Add big file (2)" &&
212 + git commit -qm "Add big file (2)" &&
213
214 # ensure any possible loose objects are in a pack-file
215 git maintenance run --task=loose-objects &&