reinject: Added new mode which can reinject known files into the annex.
For example: git-annex reinject --known /mnt/backup/*
This commit is contained in:
parent
f9f2576203
commit
8ab27235ea
5 changed files with 101 additions and 26 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue