summaryrefslogtreecommitdiff
path: root/Command.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-09-14 13:47:22 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-09-14 13:47:22 -0400
commit949b3f69d0f2b2a5c32a00d05d09a0b312fad35a (patch)
treecc81f8d61652741e365309b86a8020edbce6318e /Command.hs
parent1ac6217c74b63b9b154d5ee14ed72df8b5aa9268 (diff)
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.
Diffstat (limited to 'Command.hs')
-rw-r--r--Command.hs2
1 files changed, 2 insertions, 0 deletions
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