From 949b3f69d0f2b2a5c32a00d05d09a0b312fad35a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 14 Sep 2011 13:47:22 -0400 Subject: optimize: A new subcommand that either gets or drops file content as needed to work toward meeting the configured numcopies setting. This is currently rather simplistic, though still useful. In the future, it could become smarter about what content is stored where, etc. --- Command.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Command.hs') diff --git a/Command.hs b/Command.hs index 78f9823fb..75c3b4412 100644 --- a/Command.hs +++ b/Command.hs @@ -131,6 +131,8 @@ withAttrFilesInGit attr a params = do repo <- Annex.gitRepo files <- liftIO $ runPreserveOrder (LsFiles.inRepo repo) params liftM (map a) $ liftIO $ Git.checkAttr repo attr files +withNumCopies :: CommandSeekAttrFiles +withNumCopies = withAttrFilesInGit "annex.numcopies" withBackendFilesInGit :: CommandSeekBackendFiles withBackendFilesInGit a params = do repo <- Annex.gitRepo -- cgit v1.2.3