summaryrefslogtreecommitdiff
path: root/Logs
diff options
context:
space:
mode:
Diffstat (limited to 'Logs')
-rw-r--r--Logs/Unused.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Logs/Unused.hs b/Logs/Unused.hs
index cdfcd2165..0af319f04 100644
--- a/Logs/Unused.hs
+++ b/Logs/Unused.hs
@@ -20,9 +20,10 @@ module Logs.Unused (
updateUnusedLog,
readUnusedLog,
readUnusedMap,
+ dateUnusedLog,
unusedKeys,
+ unusedKeys',
setUnusedKeys,
- unusedKeys'
) where
import qualified Data.Map as M
@@ -88,6 +89,11 @@ readUnusedLog prefix = do
readUnusedMap :: FilePath -> Annex UnusedMap
readUnusedMap = log2map <$$> readUnusedLog
+dateUnusedLog :: FilePath -> Annex (Maybe UTCTime)
+dateUnusedLog prefix = do
+ f <- fromRepo $ gitAnnexUnusedLog prefix
+ liftIO $ catchMaybeIO $ getModificationTime f
+
{- Set of unused keys. This is cached for speed. -}
unusedKeys :: Annex (S.Set Key)
unusedKeys = maybe (setUnusedKeys =<< unusedKeys') return