From b48a044d26bb607da9962b9086e9da2db9e11620 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 22 Apr 2016 13:49:32 -0400 Subject: reinject: Added new mode which can reinject known files into the annex. For example: git-annex reinject --known /mnt/backup/* --- Logs/Location.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Logs') diff --git a/Logs/Location.hs b/Logs/Location.hs index 2698d7f95..ba2aed1b5 100644 --- a/Logs/Location.hs +++ b/Logs/Location.hs @@ -19,6 +19,7 @@ module Logs.Location ( logChange, loggedLocations, loggedLocationsHistorical, + isKnownKey, checkDead, setDead, loggedKeys, @@ -65,6 +66,13 @@ getLoggedLocations getter key = do config <- Annex.getGitConfig map toUUID <$> getter (locationLogFile config key) +{- Is there a location log for the key? True even for keys with no + - remaining locations. -} +isKnownKey :: Key -> Annex Bool +isKnownKey key = do + config <- Annex.getGitConfig + not . null <$> readLog (locationLogFile config key) + {- For a key to be dead, all locations that have location status for the key - must have InfoDead set. -} checkDead :: Key -> Annex Bool -- cgit v1.2.3