diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-17 00:33:05 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-17 00:33:05 -0400 |
commit | a0b040524a595c16ddb2dbead205ca8ccb6890aa (patch) | |
tree | f0beeccdba68a663ba00836b4a6f8497929a992e /Commands.hs | |
parent | c57b1a697c5de4e20ef10c2c4a39a77c20fde85b (diff) |
remove checksum from WORM
with size and mtime in the key, it's redundant
Diffstat (limited to 'Commands.hs')
-rw-r--r-- | Commands.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Commands.hs b/Commands.hs index 258490996..5931bf0a9 100644 --- a/Commands.hs +++ b/Commands.hs @@ -54,10 +54,7 @@ options = [ findWanted :: CmdWants -> [String] -> Git.Repo -> IO [String] findWanted FilesNotInGit params repo = do files <- mapM (Git.notInRepo repo) params - return $ filter notstate $ foldl (++) [] files - where - -- never include files in the state directory - notstate f = stateLoc /= take (length stateLoc) f + return $ foldl (++) [] files findWanted FilesInGit params repo = do files <- mapM (Git.inRepo repo) params return $ foldl (++) [] files @@ -82,8 +79,10 @@ parseCmd argv state = do [Command _ action want] -> do f <- findWanted want (drop 1 params) (BackendTypes.repo state) - return (flags, map action f) + return (flags, map action $ filter notstate f) where + -- never include files from the state directory + notstate f = stateLoc /= take (length stateLoc) f getopt = case getOpt Permute options argv of (flags, params, []) -> return (flags, params) (_, _, errs) -> ioError (userError (concat errs ++ usage)) |