annex.jobs

Added annex.jobs setting, which is like using the -J option.

Of course, -J overrides annex.jobs.

This commit was sponsored by Trenton Cronholm on Patreon.
This commit is contained in:
Joey Hess 2018-10-04 12:47:27 -04:00
parent 585e6b39aa
commit 6ba3dea566
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 46 additions and 17 deletions

View file

@ -26,6 +26,7 @@ import Config.Cost
import Types.UUID
import Types.Distribution
import Types.Availability
import Types.Concurrency
import Types.NumCopies
import Types.Difference
import Types.RefSpec
@ -99,6 +100,7 @@ data GitConfig = GitConfig
, annexAllowedHttpAddresses :: String
, annexAllowUnverifiedDownloads :: Bool
, annexMaxExtensionLength :: Maybe Int
, annexJobs :: Concurrency
, coreSymlinks :: Bool
, coreSharedRepository :: SharedRepository
, receiveDenyCurrentBranch :: DenyCurrentBranch
@ -173,6 +175,7 @@ extractGitConfig r = GitConfig
, annexAllowUnverifiedDownloads = (== Just "ACKTHPPT") $
getmaybe (annex "security.allow-unverified-downloads")
, annexMaxExtensionLength = getmayberead (annex "maxextensionlength")
, annexJobs = maybe NonConcurrent Concurrent $ getmayberead (annex "jobs")
, coreSymlinks = getbool "core.symlinks" True
, coreSharedRepository = getSharedRepository r
, receiveDenyCurrentBranch = getDenyCurrentBranch r