summaryrefslogtreecommitdiff
path: root/Annex/FileMatcher.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-01-22 16:35:32 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-01-22 16:35:32 -0400
commit180fbceee03badc450c84c28ef8219fa68d80bd6 (patch)
tree1739e92f46067ae0be84af6789b3d3b9adb09ee1 /Annex/FileMatcher.hs
parent9a5de318d15f0234080a6f0bd802fe073cf57334 (diff)
add "unused" preferred content expression
With a really nice optimisation that keeps it from having any overhead in normal operation! This commit was sponsored by Ulises Vitulli.
Diffstat (limited to 'Annex/FileMatcher.hs')
-rw-r--r--Annex/FileMatcher.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/Annex/FileMatcher.hs b/Annex/FileMatcher.hs
index b26a0d7ac..c144920cf 100644
--- a/Annex/FileMatcher.hs
+++ b/Annex/FileMatcher.hs
@@ -65,6 +65,7 @@ parseToken checkpresent checkpreferreddir groupmap t
| t `elem` tokens = Right $ token t
| t == "present" = use checkpresent
| t == "inpreferreddir" = use checkpreferreddir
+ | t == "unused" = Right (Operation limitUnused)
| otherwise = maybe (Left $ "near " ++ show t) use $ M.lookup k $
M.fromList
[ ("include", limitInclude)