rename Configurable for clarity
authorJoey Hess <joeyh@joeyh.name>
Wed, 16 Sep 2020 15:16:48 +0000 (11:16 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 16 Sep 2020 15:16:48 +0000 (11:16 -0400)
Config/GitConfig.hs
Types/GitConfig.hs

index d01ca64083cceb81e92a994a36f3364707a4ab71..d78047c21246e5358066e27746e894083bd01be1 100644 (file)
@@ -20,13 +20,13 @@ import Logs.Config
  - Note: Be sure to add the config to mergeGitConfig and to
  - globalConfigs.
  -}
-getGitConfigVal :: (GitConfig -> Configurable a) -> Annex a
+getGitConfigVal :: (GitConfig -> GlobalConfigurable a) -> Annex a
 getGitConfigVal f = getGitConfigVal' f >>= \case
        HasGlobalConfig c -> return c
        DefaultConfig d -> return d
        HasGitConfig c -> return c
 
-getGitConfigVal' :: (GitConfig -> Configurable a) -> Annex (Configurable a)
+getGitConfigVal' :: (GitConfig -> GlobalConfigurable a) -> Annex (GlobalConfigurable a)
 getGitConfigVal' f = (f <$> Annex.getGitConfig) >>= \case
        DefaultConfig _ -> do
                r <- Annex.gitRepo
index ab586b063a0a7e3c2910e8ff6d3eac942258b994..c4e3abbf8e492cb23a503596401427b6314deaa6 100644 (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