avoid counting size of keys that are in the journal twice

In calcRepoSizes and also git-annex info, when a key was in the journal,
it was passed to the callback twice, so the calculated size was wrong.
This commit is contained in:
Joey Hess 2024-08-13 13:23:39 -04:00
parent 467d80101a
commit 5afbea25e7
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 25 additions and 20 deletions

View file

@ -641,7 +641,7 @@ cachedAllRepoData = do
Just _ -> return s
Nothing -> do
matcher <- lift getKeyOnlyMatcher
r <- lift $ overLocationLogs (emptyKeyInfo, mempty) $ \k locs (d, rd) -> do
r <- lift $ overLocationLogs True (emptyKeyInfo, mempty) $ \k locs (d, rd) -> do
ifM (matchOnKey matcher k)
( do
alivelocs <- snd