diff options
Diffstat (limited to 'Types/GitConfig.hs')
-rw-r--r-- | Types/GitConfig.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Types/GitConfig.hs b/Types/GitConfig.hs index 5cd09dbde..af516d27a 100644 --- a/Types/GitConfig.hs +++ b/Types/GitConfig.hs @@ -19,12 +19,13 @@ import Utility.DataUnits import Config.Cost import Types.Distribution import Types.Availability +import Types.NumCopies {- Main git-annex settings. Each setting corresponds to a git-config key - such as annex.foo -} data GitConfig = GitConfig { annexVersion :: Maybe String - , annexNumCopies :: Maybe Int + , annexNumCopies :: Maybe NumCopies , annexDiskReserve :: Integer , annexDirect :: Bool , annexBackends :: [String] @@ -52,7 +53,7 @@ data GitConfig = GitConfig extractGitConfig :: Git.Repo -> GitConfig extractGitConfig r = GitConfig { annexVersion = notempty $ getmaybe (annex "version") - , annexNumCopies = getmayberead (annex "numcopies") + , annexNumCopies = NumCopies <$> getmayberead (annex "numcopies") , annexDiskReserve = fromMaybe onemegabyte $ readSize dataUnits =<< getmaybe (annex "diskreserve") , annexDirect = getbool (annex "direct") False |