summaryrefslogtreecommitdiff
path: root/Seek.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-01-18 14:58:56 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-01-18 14:58:56 -0400
commitb16851705701be534eee93e2ac83b92f38d03874 (patch)
tree0931ebe2a21c7090b0ea84ec96b86be7b66bb96c /Seek.hs
parent842ca9c4b684ec21b9e5a99b3742db5f36a1440f (diff)
Allow --all to be mixed with matching options like --copies and --in (but not --include and --exclude).
Diffstat (limited to 'Seek.hs')
-rw-r--r--Seek.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Seek.hs b/Seek.hs
index 4b3281a56..3c84814f5 100644
--- a/Seek.hs
+++ b/Seek.hs
@@ -158,7 +158,10 @@ withKeyOptions keyop fallbackop params = do
go a = do
unless (null params) $
error "Cannot mix --all or --unused with file names."
- map keyop <$> a
+ matcher <- Limit.getMatcher
+ map (process matcher) <$> a
+ process matcher k = ifM (matcher $ MatchingKey k)
+ ( keyop k , return Nothing)
prepFiltered :: (FilePath -> CommandStart) -> Annex [FilePath] -> Annex [CommandStart]
prepFiltered a fs = do