dropunused: Support --jobs

Sponsored-by: Kevin Mueller on Patreon
This commit is contained in:
Joey Hess 2023-07-21 14:03:34 -04:00
parent 33ba537728
commit 7f38355860
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 13 additions and 2 deletions

View file

@ -20,7 +20,7 @@ import Annex.Content
import qualified Utility.RawFilePath as R
cmd :: Command
cmd = withAnnexOptions [jsonOptions] $
cmd = withAnnexOptions [jobsOption, jsonOptions] $
command "dropunused" SectionMaintenance
"drop unused file content"
(paramRepeating paramNumRange) (seek <$$> optParser)
@ -36,7 +36,7 @@ optParser desc = DropUnusedOptions
<*> optional (Command.Drop.parseDropFromOption)
seek :: DropUnusedOptions -> CommandSeek
seek o = do
seek o = startConcurrency commandStages $ do
numcopies <- getNumCopies
mincopies <- getMinCopies
from <- maybe (pure Nothing) (Just <$$> getParsed) (dropFrom o)