diff --git a/CHANGELOG b/CHANGELOG index 004bf899a6..70e31110a2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -16,6 +16,8 @@ git-annex (6.20180317) UNRELEASED; urgency=medium uses http-conduit. * info: Added "combined size of repositories containing these files" stat when run on a directory. + * info: Changed sorting of numcopies stats table, so it's ordered + by the variance from the desired number of copies. -- Joey Hess Mon, 19 Mar 2018 23:13:59 -0400 diff --git a/Command/Info.hs b/Command/Info.hs index 54e067a80b..6ec6a1f71e 100644 --- a/Command/Info.hs +++ b/Command/Info.hs @@ -477,7 +477,7 @@ numcopies_stats = stat "numcopies stats" $ json fmt $ calc <$> (maybe M.empty numCopiesVarianceMap <$> cachedNumCopiesStats) where calc = map (\(variance, count) -> (show variance, count)) - . sortBy (flip (comparing snd)) + . sortBy (flip (comparing fst)) . M.toList fmt = multiLine . map (\(variance, count) -> "numcopies " ++ variance ++ ": " ++ show count)