From c21998722cb6a65993a3b72e66b225443cfce48b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 22 Mar 2011 17:41:06 -0400 Subject: 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. --- Backend/SHA.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Backend') 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 -- cgit v1.2.3