]> Sergey Matveev's repositories - public-inbox.git/commitdiff
index: avoid false-positive warning on off-by-one
authorEric Wong <e@80x24.org>
Thu, 12 Jul 2018 06:35:27 +0000 (06:35 +0000)
committerEric Wong <e@80x24.org>
Wed, 18 Jul 2018 08:23:03 +0000 (08:23 +0000)
We subtract one from "jobs" to map to "partitions" to account
for the overview index and git fast-import jobs.

script/public-inbox-index

index 2a7a524b34abee1765c3adc9288b64cf29dac78e..e487e3fe327f69080e29996bb934a3cd219f46f8 100755 (executable)
@@ -109,7 +109,7 @@ sub index_dir {
                                $v2w->{parallel} = 0;
                        } else {
                                my $n = $v2w->{partitions};
-                               if ($jobs != $n) {
+                               if ($jobs != ($n + 1)) {
                                        warn
 "Unable to respect --jobs=$jobs, inbox was created with $n partitions\n";
                                }