display a message in the unlikely scenario of fsking a dead repository
This commit is contained in:
parent
468e52fbe3
commit
4b02af57b6
5 changed files with 30 additions and 1 deletions
|
@ -90,6 +90,7 @@ seek :: FsckOptions -> CommandSeek
|
|||
seek o = allowConcurrentOutput $ do
|
||||
from <- maybe (pure Nothing) (Just <$$> getParsed) (fsckFromOption o)
|
||||
u <- maybe getUUID (pure . Remote.uuid) from
|
||||
checkDeadRepo u
|
||||
i <- prepIncremental u (incrementalOpt o)
|
||||
withKeyOptions (keyOptions o) False
|
||||
(\k -> startKey i k =<< getNumCopies)
|
||||
|
@ -98,6 +99,11 @@ seek o = allowConcurrentOutput $ do
|
|||
cleanupIncremental i
|
||||
void $ tryIO $ recordActivity Fsck u
|
||||
|
||||
checkDeadRepo :: UUID -> Annex ()
|
||||
checkDeadRepo u =
|
||||
whenM ((==) DeadTrusted <$> lookupTrust u) $
|
||||
earlyWarning "Warning: Fscking a repository that is currently marked as dead."
|
||||
|
||||
start :: Maybe Remote -> Incremental -> FilePath -> Key -> CommandStart
|
||||
start from inc file key = do
|
||||
v <- Backend.getBackend file key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue