differentiate between concurrency enabled at command line and by git config

The latter should not affect --batch mode.
This commit is contained in:
Joey Hess 2020-09-16 11:41:28 -04:00
parent 8471df3b6d
commit 77c42782d0
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
9 changed files with 46 additions and 21 deletions

View file

@ -68,6 +68,7 @@ import Types.Command (StartMessage(..), SeekInput)
import Types.Transfer (transferKey)
import Messages.Internal
import Messages.Concurrent
import Annex.Concurrent.Utility
import qualified Messages.JSON as JSON
import qualified Annex
@ -298,7 +299,7 @@ prompt a = do
{- Like prompt, but for a non-annex action that prompts. -}
mkPrompter :: (MonadMask m, MonadIO m) => Annex (m a -> m a)
mkPrompter = Annex.getState Annex.concurrency >>= \case
mkPrompter = getConcurrency >>= \case
NonConcurrent -> return id
(Concurrent _) -> goconcurrent
ConcurrentPerCpu -> goconcurrent