rename Configurable for clarity
This commit is contained in:
parent
7a4f3ff345
commit
8471df3b6d
2 changed files with 11 additions and 11 deletions
|
@ -20,13 +20,13 @@ import Logs.Config
|
||||||
- Note: Be sure to add the config to mergeGitConfig and to
|
- Note: Be sure to add the config to mergeGitConfig and to
|
||||||
- globalConfigs.
|
- globalConfigs.
|
||||||
-}
|
-}
|
||||||
getGitConfigVal :: (GitConfig -> Configurable a) -> Annex a
|
getGitConfigVal :: (GitConfig -> GlobalConfigurable a) -> Annex a
|
||||||
getGitConfigVal f = getGitConfigVal' f >>= \case
|
getGitConfigVal f = getGitConfigVal' f >>= \case
|
||||||
HasGlobalConfig c -> return c
|
HasGlobalConfig c -> return c
|
||||||
DefaultConfig d -> return d
|
DefaultConfig d -> return d
|
||||||
HasGitConfig c -> return c
|
HasGitConfig c -> return c
|
||||||
|
|
||||||
getGitConfigVal' :: (GitConfig -> Configurable a) -> Annex (Configurable a)
|
getGitConfigVal' :: (GitConfig -> GlobalConfigurable a) -> Annex (GlobalConfigurable a)
|
||||||
getGitConfigVal' f = (f <$> Annex.getGitConfig) >>= \case
|
getGitConfigVal' f = (f <$> Annex.getGitConfig) >>= \case
|
||||||
DefaultConfig _ -> do
|
DefaultConfig _ -> do
|
||||||
r <- Annex.gitRepo
|
r <- Annex.gitRepo
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
|
||||||
module Types.GitConfig (
|
module Types.GitConfig (
|
||||||
Configurable(..),
|
GlobalConfigurable(..),
|
||||||
ConfigSource(..),
|
ConfigSource(..),
|
||||||
GitConfig(..),
|
GitConfig(..),
|
||||||
extractGitConfig,
|
extractGitConfig,
|
||||||
|
@ -53,7 +53,7 @@ import qualified Data.ByteString as B
|
||||||
|
|
||||||
-- | A configurable value, that may not be fully determined yet because
|
-- | A configurable value, that may not be fully determined yet because
|
||||||
-- the global git config has not yet been loaded.
|
-- the global git config has not yet been loaded.
|
||||||
data Configurable a
|
data GlobalConfigurable a
|
||||||
= HasGitConfig a
|
= HasGitConfig a
|
||||||
-- ^ The git config has a value.
|
-- ^ The git config has a value.
|
||||||
| HasGlobalConfig a
|
| HasGlobalConfig a
|
||||||
|
@ -84,17 +84,17 @@ data GitConfig = GitConfig
|
||||||
, annexDelayAdd :: Maybe Int
|
, annexDelayAdd :: Maybe Int
|
||||||
, annexHttpHeaders :: [String]
|
, annexHttpHeaders :: [String]
|
||||||
, annexHttpHeadersCommand :: Maybe String
|
, annexHttpHeadersCommand :: Maybe String
|
||||||
, annexAutoCommit :: Configurable Bool
|
, annexAutoCommit :: GlobalConfigurable Bool
|
||||||
, annexResolveMerge :: Configurable Bool
|
, annexResolveMerge :: GlobalConfigurable Bool
|
||||||
, annexSyncContent :: Configurable Bool
|
, annexSyncContent :: GlobalConfigurable Bool
|
||||||
, annexSyncOnlyAnnex :: Configurable Bool
|
, annexSyncOnlyAnnex :: GlobalConfigurable Bool
|
||||||
, annexDebug :: Bool
|
, annexDebug :: Bool
|
||||||
, annexWebOptions :: [String]
|
, annexWebOptions :: [String]
|
||||||
, annexYoutubeDlOptions :: [String]
|
, annexYoutubeDlOptions :: [String]
|
||||||
, annexAriaTorrentOptions :: [String]
|
, annexAriaTorrentOptions :: [String]
|
||||||
, annexCrippledFileSystem :: Bool
|
, annexCrippledFileSystem :: Bool
|
||||||
, annexLargeFiles :: Configurable (Maybe String)
|
, annexLargeFiles :: GlobalConfigurable (Maybe String)
|
||||||
, annexDotFiles :: Configurable Bool
|
, annexDotFiles :: GlobalConfigurable Bool
|
||||||
, annexGitAddToAnnex :: Bool
|
, annexGitAddToAnnex :: Bool
|
||||||
, annexAddSmallFiles :: Bool
|
, annexAddSmallFiles :: Bool
|
||||||
, annexFsckNudge :: Bool
|
, annexFsckNudge :: Bool
|
||||||
|
@ -111,7 +111,7 @@ data GitConfig = GitConfig
|
||||||
, annexVerify :: Bool
|
, annexVerify :: Bool
|
||||||
, annexPidLock :: Bool
|
, annexPidLock :: Bool
|
||||||
, annexPidLockTimeout :: Seconds
|
, annexPidLockTimeout :: Seconds
|
||||||
, annexAddUnlocked :: Configurable (Maybe String)
|
, annexAddUnlocked :: GlobalConfigurable (Maybe String)
|
||||||
, annexSecureHashesOnly :: Bool
|
, annexSecureHashesOnly :: Bool
|
||||||
, annexRetry :: Maybe Integer
|
, annexRetry :: Maybe Integer
|
||||||
, annexForwardRetry :: Maybe Integer
|
, annexForwardRetry :: Maybe Integer
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue