summaryrefslogtreecommitdiff
path: root/Command.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-06-23 08:48:13 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-06-23 08:48:13 -0400
commit9e37898e2186c8f7bb71a5d2bd7a02303410b363 (patch)
treea964c45d443c3ecaa6dea61b48caa996b8b3552b /Command.hs
parentaf10b2854a199ed9985cde938d46b252f4d5e503 (diff)
remove stateDir
Diffstat (limited to 'Command.hs')
-rw-r--r--Command.hs11
1 files changed, 4 insertions, 7 deletions
diff --git a/Command.hs b/Command.hs
index 228c1f40e..129233d74 100644
--- a/Command.hs
+++ b/Command.hs
@@ -22,7 +22,6 @@ import qualified Backend
import Messages
import qualified Annex
import qualified GitRepo as Git
-import Locations
import Utility
import Types.Key
@@ -181,17 +180,15 @@ withNothing _ _ = error "This command takes no parameters."
backendPairs :: CommandSeekBackendFiles
backendPairs a files = liftM (map a) $ Backend.chooseBackends files
-{- Filter out files from the state directory, and those matching the
- - exclude glob pattern, if it was specified. -}
+{- Filter out files those matching the exclude glob pattern,
+ - if it was specified. -}
filterFiles :: [FilePath] -> Annex [FilePath]
filterFiles l = do
- let l' = filter notState l
exclude <- Annex.getState Annex.exclude
if null exclude
- then return l'
- else return $ filter (notExcluded $ wildsRegex exclude) l'
+ then return l
+ else return $ filter (notExcluded $ wildsRegex exclude) l
where
- notState f = not $ stateDir `isPrefixOf` f
notExcluded r f = isNothing $ match r f []
wildsRegex :: [String] -> Regex