summaryrefslogtreecommitdiff
path: root/CmdLine.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-11-11 18:26:27 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-11-11 18:29:58 -0400
commit5357d3a37af9e3d3a0aec207a8ba7fb94bfea953 (patch)
treeb844e85403edb13ac0c50563da8c033a4ad04ce1 /CmdLine.hs
parentf2c7a6e73d342f4f82be4e2839a2022f97539c65 (diff)
remove dup filter
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index 5c25b41c3..93404e546 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -117,7 +117,7 @@ usage = usageInfo header options ++ "\nSubcommands:\n" ++ cmddescs
pad n s = replicate (n - length s) ' '
{- These functions find appropriate files or other things based on a
- user's parameters. -}
+ user's parameters, and run a specified action on them. -}
withFilesInGit :: SubCmdSeekStrings
withFilesInGit a params = do
repo <- Annex.gitRepo
@@ -135,7 +135,7 @@ withFilesNotInGit :: SubCmdSeekBackendFiles
withFilesNotInGit a params = do
repo <- Annex.gitRepo
newfiles <- liftIO $ mapM (Git.notInRepo repo) params
- backendPairs a $ foldl (++) [] newfiles
+ backendPairs a $ filter notState $ foldl (++) [] newfiles
withFilesUnlocked :: SubCmdSeekBackendFiles
withFilesUnlocked a params = do
-- unlocked files have changed type from a symlink to a regular file
@@ -146,7 +146,7 @@ withFilesUnlocked a params = do
backendPairs :: SubCmdSeekBackendFiles
backendPairs a files = do
pairs <- Backend.chooseBackends files
- return $ map a $ filter (\(f,_) -> notState f) pairs
+ return $ map a pairs
withDescription :: SubCmdSeekStrings
withDescription a params = return [a $ unwords params]
withFilesToBeCommitted :: SubCmdSeekStrings