maxsize overview display and --json support

This commit is contained in:
Joey Hess 2024-08-18 11:18:16 -04:00
parent 016edcf437
commit 99514f9d18
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
8 changed files with 109 additions and 27 deletions

View file

@ -573,7 +573,8 @@ reposizes_stats count desc m = stat desc $ nojson $ do
let maxlen = maximum (map (length . snd) l)
descm <- lift Remote.uuidDescriptions
-- This also handles json display.
s <- lift $ Remote.prettyPrintUUIDsWith (Just "size") desc descm (Just . show) $
s <- lift $ Remote.prettyPrintUUIDsWith (Just "size") desc descm
(\sz -> Just $ show sz ++ ": ") $
map (\(u, sz) -> (u, Just $ mkdisp sz maxlen)) l
return $ if count
then countRepoList (length l) s