diff options
author | Joey Hess <joey@kitenet.net> | 2014-01-21 17:08:49 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-01-21 17:25:39 -0400 |
commit | d44bd607d4fd18eadabe3c7693ebcf1c74aae63e (patch) | |
tree | 83e8867f45199ece960fc67e4d31f1d9b4a5d56a /Types | |
parent | d5f7fb27aad3e2e9c4bebb9ccd5577af8deb25c7 (diff) |
numcopies cleanup, part 2
This includes several bug fixes.
Diffstat (limited to 'Types')
-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 |