On 7/1/2019 2:22 PM, Johannes Sixt wrote: > Am 01.07.19 um 14:30 schrieb Derrick Stolee: >> On 7/1/2019 8:11 AM, Johannes Schindelin wrote: >>> Or we stop introducing new Perl calls, and use the perfectly fine >>> `test-tool path-utils file-size` command: >>> >>> https://github.com/git/git/blob/v2.22.0/t/helper/test-path-utils.c#L302-L312 >>> >>> This solves not only portability problems but also avoids yet another >>> obstacle into making a `NO_PERL` test suite run really work without Perl. >> Thanks! This does seem like the best option. Thanks for bringing this to our >> attention. Here is a diff, and I'll prepare a full patch: > > Thanks. Please also explain why the first of the two tests does not fail > with a large --batch-size (unless it is obvious for people who know a > bit about multi-pack-index, of course). Sorry about missing that. Here is an explanation: The --batch-size=X option determines how much data we want to move in a single operation. Based on this value, we select packs greedily as follows: 1. If a pack has size at most X, include it. 2. If our total pack size is greater than X, stop. At the end of this process, if we have zero or one packs we do nothing. That is why a small size does nothing. Also, if our total pack size is smaller than X, we do nothing. Our batch is not "full" enough to merit the work. This is why a large size does nothing. Thanks, -Stolee