diff options
author | Joey Hess <joey@kitenet.net> | 2011-10-29 17:49:37 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-10-29 18:03:28 -0400 |
commit | 2566eb85fe2bbd0f9d1798d50ca0d88970a4490c (patch) | |
tree | 29cda2f8ef30eb8637c0bc7d695d3d3f77df0136 /Command/Unused.hs | |
parent | fef2cf739872b905bbdf493f9f3ba7124400c633 (diff) |
fsck: Now works in bare repositories.
Checks location log information, and file contents.
Does not check that numcopies is satisfied, as .gitattributes information
about numcopies is not available in a bare repository. In practice, that
should not be a problem, since fsck is also run in a checkout and will
check numcopies there.
Diffstat (limited to 'Command/Unused.hs')
-rw-r--r-- | Command/Unused.hs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs index 11c3f429e..a6cced27f 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -67,19 +67,11 @@ checkRemoteUnused name = do checkRemoteUnused' :: Remote.Remote Annex -> Annex () checkRemoteUnused' r = do showAction "checking for unused data" - remotehas <- filterM isthere =<< loggedKeys + remotehas <- loggedKeysFor (Remote.uuid r) remoteunused <- excludeReferenced remotehas let list = number 0 remoteunused writeUnusedFile "" list unless (null remoteunused) $ showLongNote $ remoteUnusedMsg r list - where - {- This should run strictly to avoid the filterM - - building many thunks containing keyLocations data. -} - isthere k = do - us <- keyLocations k - let !there = uuid `elem` us - return there - uuid = Remote.uuid r writeUnusedFile :: FilePath -> [(Int, Key)] -> Annex () writeUnusedFile prefix l = do |