aboutsummaryrefslogtreecommitdiff
path: root/Types/GitConfig.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-01-22 23:10:51 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-01-22 23:10:51 -0400
commit8e953532e27d6dee001d5ef6c9230ac03c36c335 (patch)
treebceefb9cc29e7022e5b6cae72d1388f67c4444b7 /Types/GitConfig.hs
parentd4c3bee234817699b162fd692a0ce8aa5bdfc65b (diff)
allow annex.expireunused to be set to false, as well as to a duration
Diffstat (limited to 'Types/GitConfig.hs')
-rw-r--r--Types/GitConfig.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Types/GitConfig.hs b/Types/GitConfig.hs
index f8e3be98e..148d73b93 100644
--- a/Types/GitConfig.hs
+++ b/Types/GitConfig.hs
@@ -47,7 +47,7 @@ data GitConfig = GitConfig
, annexLargeFiles :: Maybe String
, annexFsckNudge :: Bool
, annexAutoUpgrade :: AutoUpgrade
- , annexExpireUnused :: Maybe Duration
+ , annexExpireUnused :: Maybe (Maybe Duration)
, coreSymlinks :: Bool
, gcryptId :: Maybe String
}
@@ -77,7 +77,8 @@ extractGitConfig r = GitConfig
, annexLargeFiles = getmaybe (annex "largefiles")
, annexFsckNudge = getbool (annex "fscknudge") True
, annexAutoUpgrade = toAutoUpgrade $ getmaybe (annex "autoupgrade")
- , annexExpireUnused = parseDuration =<< getmaybe (annex "expireunused")
+ , annexExpireUnused = maybe Nothing Just . parseDuration
+ <$> getmaybe (annex "expireunused")
, coreSymlinks = getbool "core.symlinks" True
, gcryptId = getmaybe "core.gcrypt-id"
}