summaryrefslogtreecommitdiff
path: root/Annex/Content/Direct.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/Content/Direct.hs')
-rw-r--r--Annex/Content/Direct.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs
index 75a32e3fc..75cdaad79 100644
--- a/Annex/Content/Direct.hs
+++ b/Annex/Content/Direct.hs
@@ -10,6 +10,7 @@ module Annex.Content.Direct (
removeAssociatedFile,
addAssociatedFile,
goodContent,
+ changedFileStatus,
updateCache,
recordedCache,
compareCache,
@@ -79,6 +80,12 @@ goodContent key file = do
old <- recordedCache key
compareCache file old
+changedFileStatus :: Key -> FileStatus -> Annex Bool
+changedFileStatus key status = do
+ old <- recordedCache key
+ let curr = toCache status
+ return $ curr == old
+
{- Gets the recorded cache for a key. -}
recordedCache :: Key -> Annex (Maybe Cache)
recordedCache key = withCacheFile key $ \cachefile ->