diff options
author | Joey Hess <joey@kitenet.net> | 2012-04-23 10:37:05 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-04-23 10:37:05 -0400 |
commit | eedde3454901887f1a29766b15f60e26be64583a (patch) | |
tree | f007cdcd989bd668111b837d7f87b7eea264ff33 /Command/Status.hs | |
parent | 3911b2db138ba72ed40da858ff61c8f3828d08b9 (diff) |
show amount of reserved space
Diffstat (limited to 'Command/Status.hs')
-rw-r--r-- | Command/Status.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Command/Status.hs b/Command/Status.hs index 0c6eda0b2..16bcec7cc 100644 --- a/Command/Status.hs +++ b/Command/Status.hs @@ -69,6 +69,7 @@ fast_stats = , remote_list SemiTrusted "semitrusted" , remote_list UnTrusted "untrusted" , remote_list DeadTrusted "dead" + , disk_size ] slow_stats :: [Stat] slow_stats = @@ -78,7 +79,6 @@ slow_stats = , local_annex_size , known_annex_keys , known_annex_size - , disk_size , bloom_info , backend_usage ] @@ -175,8 +175,12 @@ disk_size = stat "available local disk space" $ json id $ lift $ <$> getDiskReserve <*> inRepo (getDiskFree . gitAnnexDir) where - calcfree reserve (Just have) = - roughSize storageUnits False $ nonneg $ have - reserve + calcfree reserve (Just have) = unwords + [ roughSize storageUnits False $ nonneg $ have - reserve + , "(+" ++ roughSize storageUnits False reserve + , "reserved)" + ] + calcfree _ _ = "unknown" nonneg x | x >= 0 = x |