summaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-03-22 17:41:06 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-03-22 17:41:06 -0400
commitc21998722cb6a65993a3b72e66b225443cfce48b (patch)
treed09ad584739a119b5e74023bd735f2bc3085a1b2 /Backend
parentaa2d8e33df3fc6ba204e28001ab0d1d231c9c58e (diff)
fast mode
Add --fast flag, that can enable less expensive, but also less thurough versions of some commands. * Add --fast flag, that can enable less expensive, but also less thurough versions of some commands. * fsck: In fast mode, avoid checking checksums. * unused: In fast mode, just show all existing temp files as unused, and avoid expensive scan for other unused content.
Diffstat (limited to 'Backend')
-rw-r--r--Backend/SHA.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Backend/SHA.hs b/Backend/SHA.hs
index 056385107..0ec555ce3 100644
--- a/Backend/SHA.hs
+++ b/Backend/SHA.hs
@@ -80,9 +80,10 @@ keyValue size file = do
checkKeyChecksum :: SHASize -> Key -> Annex Bool
checkKeyChecksum size key = do
g <- Annex.gitRepo
+ fast <- Annex.getState Annex.fast
let file = gitAnnexLocation g key
present <- liftIO $ doesFileExist file
- if not present
+ if (not present || fast)
then return True
else do
s <- shaN size file