summaryrefslogtreecommitdiff
path: root/Types
diff options
context:
space:
mode:
Diffstat (limited to 'Types')
-rw-r--r--Types/GitConfig.hs5
-rw-r--r--Types/StandardGroups.hs2
2 files changed, 5 insertions, 2 deletions
diff --git a/Types/GitConfig.hs b/Types/GitConfig.hs
index e19fdc42f..f8e3be98e 100644
--- a/Types/GitConfig.hs
+++ b/Types/GitConfig.hs
@@ -1,6 +1,6 @@
{- git-annex configuration
-
- - Copyright 2012 Joey Hess <joey@kitenet.net>
+ - Copyright 2012-2014 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
@@ -20,6 +20,7 @@ import Config.Cost
import Types.Distribution
import Types.Availability
import Types.NumCopies
+import Utility.HumanTime
{- Main git-annex settings. Each setting corresponds to a git-config key
- such as annex.foo -}
@@ -46,6 +47,7 @@ data GitConfig = GitConfig
, annexLargeFiles :: Maybe String
, annexFsckNudge :: Bool
, annexAutoUpgrade :: AutoUpgrade
+ , annexExpireUnused :: Maybe Duration
, coreSymlinks :: Bool
, gcryptId :: Maybe String
}
@@ -75,6 +77,7 @@ extractGitConfig r = GitConfig
, annexLargeFiles = getmaybe (annex "largefiles")
, annexFsckNudge = getbool (annex "fscknudge") True
, annexAutoUpgrade = toAutoUpgrade $ getmaybe (annex "autoupgrade")
+ , annexExpireUnused = parseDuration =<< getmaybe (annex "expireunused")
, coreSymlinks = getbool "core.symlinks" True
, gcryptId = getmaybe "core.gcrypt-id"
}
diff --git a/Types/StandardGroups.hs b/Types/StandardGroups.hs
index f89b4e424..434156a0e 100644
--- a/Types/StandardGroups.hs
+++ b/Types/StandardGroups.hs
@@ -75,7 +75,7 @@ associatedDirectory _ _ = Nothing
{- See doc/preferred_content.mdwn for explanations of these expressions. -}
preferredContent :: StandardGroup -> PreferredContentExpression
preferredContent ClientGroup = lastResort $
- "(exclude=*/archive/* and exclude=archive/*) or (" ++ notArchived ++ ")"
+ "((exclude=*/archive/* and exclude=archive/*) or (" ++ notArchived ++ ")) and not unused"
preferredContent TransferGroup = lastResort $
"not (inallgroup=client and copies=client:2) and (" ++ preferredContent ClientGroup ++ ")"
preferredContent BackupGroup = "include=*"