Merge branch 'batchasync' into master

This commit is contained in:
Joey Hess 2020-09-16 13:02:58 -04:00
commit 83df401d93
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
106 changed files with 831 additions and 519 deletions

View file

@ -38,13 +38,18 @@ type CommandPerform = Annex (Maybe CommandCleanup)
- returns the overall success/fail of the command. -}
type CommandCleanup = Annex Bool
{- Input that was seeked on to make an ActionItem. Eg, the input filename,
- or directory name. -}
newtype SeekInput = SeekInput { fromSeekInput :: [String] }
deriving (Show)
{- Message that is displayed when starting to perform an action on
- something. The String is typically the name of the command or action
- being performed.
-}
data StartMessage
= StartMessage String ActionItem
| StartUsualMessages String ActionItem
= StartMessage String ActionItem SeekInput
| StartUsualMessages String ActionItem SeekInput
-- ^ Like StartMessage, but makes sure to enable usual message
-- display in case it was disabled by cmdnomessages.
| StartNoMessage ActionItem
@ -56,8 +61,8 @@ data StartMessage
deriving (Show)
instance MkActionItem StartMessage where
mkActionItem (StartMessage _ ai) = ai
mkActionItem (StartUsualMessages _ ai) = ai
mkActionItem (StartMessage _ ai _) = ai
mkActionItem (StartUsualMessages _ ai _) = ai
mkActionItem (StartNoMessage ai) = ai
mkActionItem (CustomOutput ai) = ai

View file

@ -17,3 +17,8 @@ parseConcurrency :: String -> Maybe Concurrency
parseConcurrency "cpus" = Just ConcurrentPerCpu
parseConcurrency "cpu" = Just ConcurrentPerCpu
parseConcurrency s = Concurrent <$> readish s
-- Concurrency can be configured at the command line or by git config.
data ConcurrencySetting
= ConcurrencyCmdLine Concurrency
| ConcurrencyGitConfig Concurrency

View file

@ -9,7 +9,7 @@
{-# LANGUAGE OverloadedStrings #-}
module Types.GitConfig (
Configurable(..),
GlobalConfigurable(..),
ConfigSource(..),
GitConfig(..),
extractGitConfig,
@ -53,7 +53,7 @@ import qualified Data.ByteString as B
-- | A configurable value, that may not be fully determined yet because
-- the global git config has not yet been loaded.
data Configurable a
data GlobalConfigurable a
= HasGitConfig a
-- ^ The git config has a value.
| HasGlobalConfig a
@ -84,17 +84,17 @@ data GitConfig = GitConfig
, annexDelayAdd :: Maybe Int
, annexHttpHeaders :: [String]
, annexHttpHeadersCommand :: Maybe String
, annexAutoCommit :: Configurable Bool
, annexResolveMerge :: Configurable Bool
, annexSyncContent :: Configurable Bool
, annexSyncOnlyAnnex :: Configurable Bool
, annexAutoCommit :: GlobalConfigurable Bool
, annexResolveMerge :: GlobalConfigurable Bool
, annexSyncContent :: GlobalConfigurable Bool
, annexSyncOnlyAnnex :: GlobalConfigurable Bool
, annexDebug :: Bool
, annexWebOptions :: [String]
, annexYoutubeDlOptions :: [String]
, annexAriaTorrentOptions :: [String]
, annexCrippledFileSystem :: Bool
, annexLargeFiles :: Configurable (Maybe String)
, annexDotFiles :: Configurable Bool
, annexLargeFiles :: GlobalConfigurable (Maybe String)
, annexDotFiles :: GlobalConfigurable Bool
, annexGitAddToAnnex :: Bool
, annexAddSmallFiles :: Bool
, annexFsckNudge :: Bool
@ -111,7 +111,7 @@ data GitConfig = GitConfig
, annexVerify :: Bool
, annexPidLock :: Bool
, annexPidLockTimeout :: Seconds
, annexAddUnlocked :: Configurable (Maybe String)
, annexAddUnlocked :: GlobalConfigurable (Maybe String)
, annexSecureHashesOnly :: Bool
, annexRetry :: Maybe Integer
, annexForwardRetry :: Maybe Integer