summaryrefslogtreecommitdiff
path: root/Types/StandardGroups.hs
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2014-01-21 18:46:39 -0400
committerJoey Hess <joey@kitenet.net>2014-01-21 18:49:25 -0400
commitf2713a3bb9c9700b31bd16ba907d3c6d7bb8949a (patch)
treef2cdbb7a104e90019aaa58ef68c6912bcefc317e /Types/StandardGroups.hs
parentf7cdc40f7b754cabbee64274ff4b654a552b9929 (diff)
benchmarked numcopies .gitattributes in preferred content
Checking .gitattributes adds a full minute to a git annex find looking for files that don't have enough copies. 2:25 increasts to 3:27. I feel this is too much of a slowdown to justify making it the default. So, exposed two versions of the preferred content expression, a slow one and a fast but approximate one. I'm using the approximate one in the default preferred content expressions to avoid slowing down the assistant.
Diffstat (limited to 'Types/StandardGroups.hs')
-rw-r--r--Types/StandardGroups.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Types/StandardGroups.hs b/Types/StandardGroups.hs
index c4c3ba9f3f..f89b4e4248 100644
--- a/Types/StandardGroups.hs
+++ b/Types/StandardGroups.hs
@@ -93,6 +93,8 @@ notArchived :: String
notArchived = "not (copies=archive:1 or copies=smallarchive:1)"
{- Most repositories want any content that is only on untrusted
- - or dead repositories, or that otherwise does not have enough copies. -}
+ - or dead repositories, or that otherwise does not have enough copies.
+ - Does not look at .gitattributes since that is quite a lot slower.
+ -}
lastResort :: String -> PreferredContentExpression
-lastResort s = "(" ++ s ++ ") or numcopiesneeded=1"
+lastResort s = "(" ++ s ++ ") or approxlackingcopies=1"