consistently don't show sizes of empty repositories
authorJoey Hess <joeyh@joeyh.name>
Sat, 17 Aug 2024 18:58:36 +0000 (14:58 -0400)
committerJoey Hess <joeyh@joeyh.name>
Sat, 17 Aug 2024 19:09:16 +0000 (15:09 -0400)
This used to be the case, and when matching options are used, that code
path still omits them, so also omit them in the getRepoSize code path.

Command/Info.hs
doc/todo/git-annex_proxies.mdwn

index 3f120c1920984fa869a1251baf5aa694bd7d84fe..0e75c84245bbf576bd1ac8469baa816e7c512df9 100644 (file)
@@ -654,7 +654,7 @@ cachedAllRepoData = do
        usereposizes s = do
                sizemap <- lift $ getRepoSizes True
                deadset <- lift $ S.fromList <$> trustGet DeadTrusted
-               let sizemap' = M.withoutKeys sizemap deadset
+               let sizemap' = M.filter (> 0) $ M.withoutKeys sizemap deadset
                lift $ unlessM (null <$> getUnmergedRefs)
                        warnunmerged
                return $ s
index 3c7b8fa8d53a301c3c2f235c1099473d4e24efea..21fdc8fd99c47a69d47b7504df49dcb15a491952 100644 (file)
@@ -81,6 +81,11 @@ Planned schedule of work:
   Also note that "fullybalanced=foo:2" is not currently actually
   implemented!
 
+* `git-annex info` in the limitedcalc path in cachedAllRepoData
+  double-counts redundant information from the journal due to using
+  overLocationLogs. In the other path it does not, and this should be fixed
+  for consistency and correctness.
+
 * `git-annex info` can use maxsize to display how full repositories are
 
 * implement size-based balancing, so all balanced repositories are around