diff options
-rw-r--r-- | Assistant/Threads/ProblemChecker.hs | 4 | ||||
-rw-r--r-- | Assistant/Threads/SanityChecker.hs | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Assistant/Threads/ProblemChecker.hs b/Assistant/Threads/ProblemChecker.hs index 1a30a337e..66dcadfff 100644 --- a/Assistant/Threads/ProblemChecker.hs +++ b/Assistant/Threads/ProblemChecker.hs @@ -41,6 +41,7 @@ handleRemoteProblem :: UrlRenderer -> Remote -> Assistant () handleRemoteProblem urlrenderer rmt | Git.repoIsLocal r && not (Git.repoIsLocalUnknown r) = whenM (liftIO $ checkAvailable True rmt) $ do + repairStaleGitLocks r fsckresults <- showFscking urlrenderer (Just $ Remote.name rmt) $ tryNonAsync $ Git.Fsck.findBroken True r whenM (repairWhenNecessary urlrenderer (Remote.uuid rmt) (Just rmt) fsckresults) $ @@ -50,4 +51,5 @@ handleRemoteProblem urlrenderer rmt r = Remote.repo rmt handleLocalRepoProblem :: UrlRenderer -> Assistant () -handleLocalRepoProblem urlrenderer = error "TODO" +handleLocalRepoProblem urlrenderer = do + repairStaleGitLocks =<< liftAnnex gitRepo diff --git a/Assistant/Threads/SanityChecker.hs b/Assistant/Threads/SanityChecker.hs index 916cf52c4..0dd047fc9 100644 --- a/Assistant/Threads/SanityChecker.hs +++ b/Assistant/Threads/SanityChecker.hs @@ -33,7 +33,7 @@ import Data.Time.Clock.POSIX - being nonresponsive.) -} sanityCheckerStartupThread :: Maybe Duration -> NamedThread sanityCheckerStartupThread startupdelay = namedThreadUnchecked "SanityCheckerStartup" $ do - checkStaleGitLocks + repairStaleGitLocks =<< liftAnnex gitRepo liftIO $ maybe noop (threadDelaySeconds . Seconds . fromIntegral . durationSeconds) startupdelay |