From 5357d3a37af9e3d3a0aec207a8ba7fb94bfea953 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Nov 2010 18:26:27 -0400 Subject: remove dup filter --- CmdLine.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'CmdLine.hs') 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 -- cgit v1.2.3