diff options
author | Joey Hess <joey@kitenet.net> | 2013-01-28 00:33:19 +1100 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-01-28 00:33:19 +1100 |
commit | 0e3f931f37c48043befb5d89df6f98d77ce145b9 (patch) | |
tree | e5a6ea48a3be0285e625b71637d9094235d1c164 /Types | |
parent | 0942d3aed3556c65da1c7741bfa47b7d948d84c3 (diff) |
add another setting to GitConfig
Diffstat (limited to 'Types')
-rw-r--r-- | Types/GitConfig.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Types/GitConfig.hs b/Types/GitConfig.hs index 30214bc290..86bfd39b6b 100644 --- a/Types/GitConfig.hs +++ b/Types/GitConfig.hs @@ -34,6 +34,7 @@ data GitConfig = GitConfig , annexHttpHeaders :: [String] , annexHttpHeadersCommand :: Maybe String , annexAutoCommit :: Bool + , annexWebOptions :: [String] } extractGitConfig :: Git.Repo -> GitConfig @@ -43,7 +44,7 @@ extractGitConfig r = GitConfig , annexDiskReserve = fromMaybe onemegabyte $ readSize dataUnits =<< getmaybe "diskreserve" , annexDirect = getbool "direct" False - , annexBackends = fromMaybe [] $ words <$> getmaybe "backends" + , annexBackends = getwords "backends" , annexQueueSize = getmayberead "queuesize" , annexBloomCapacity = getmayberead "bloomcapacity" , annexBloomAccuracy = getmayberead "bloomaccuracy" @@ -53,6 +54,7 @@ extractGitConfig r = GitConfig , annexHttpHeaders = getlist "http-headers" , annexHttpHeadersCommand = getmaybe "http-headers-command" , annexAutoCommit = getbool "autocommit" True + , annexWebOptions = getwords "web-options" } where get k def = fromMaybe def $ getmayberead k @@ -61,6 +63,7 @@ extractGitConfig r = GitConfig getmayberead k = readish =<< getmaybe k getmaybe k = Git.Config.getMaybe (key k) r getlist k = Git.Config.getList (key k) r + getwords k = fromMaybe [] $ words <$> getmaybe k key k = "annex." ++ k |