diff --git a/CHANGELOG b/CHANGELOG index eea3df362a..137ba0d99a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ git-annex (10.20250321) UNRELEASED; urgency=medium configured as annex-cluster-node, warn and avoid writing bad data to the git-annex branch. * Fix build without the assistant. + * fsck: Avoid complaining about required content of dead repositories. -- Joey Hess Fri, 21 Mar 2025 12:27:11 -0400 diff --git a/Command/Fsck.hs b/Command/Fsck.hs index a6b6e54875..50c21149b3 100644 --- a/Command/Fsck.hs +++ b/Command/Fsck.hs @@ -375,11 +375,13 @@ verifyRequiredContent key ai@(ActionItemAssociatedFile afile _) = case afile of -- Can't be checked if there's no associated file. AssociatedFile Nothing -> return True AssociatedFile (Just _) -> do - requiredlocs <- S.fromList . M.keys <$> requiredContentMap - if S.null requiredlocs + requiredlocs <- filterM notdead =<< (M.keys <$> requiredContentMap) + if null requiredlocs then return True - else go requiredlocs + else go (S.fromList requiredlocs) where + notdead u = (/=) DeadTrusted <$> lookupTrust u + go requiredlocs = do presentlocs <- S.fromList <$> loggedLocations key missinglocs <- filterM diff --git a/doc/bugs/fsck_complains_about_requires_of_dead_repos.mdwn b/doc/bugs/fsck_complains_about_requires_of_dead_repos.mdwn index c73a886d46..62578ad8e9 100644 --- a/doc/bugs/fsck_complains_about_requires_of_dead_repos.mdwn +++ b/doc/bugs/fsck_complains_about_requires_of_dead_repos.mdwn @@ -37,3 +37,5 @@ local repository version: 10 ### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders) Best invention since sliced bread. + +> Good catch! [[fixed|done]] --[[Joey]]