info: Display trust level when getting info on a uuid, same as on a remote.

This commit is contained in:
Joey Hess 2019-09-01 16:48:46 -04:00
parent 31a6086a9a
commit 0af7ebdc2a
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 4 additions and 4 deletions

View file

@ -19,6 +19,7 @@ git-annex (7.20190826) UNRELEASED; urgency=medium
* info: When file matching options are specified when getting * info: When file matching options are specified when getting
info of something other than a directory, they won't have any effect, info of something other than a directory, they won't have any effect,
so error out to avoid confusion. so error out to avoid confusion.
* info: Display trust level when getting info on a uuid, same as on a remote.
* When upgrading a direct mode repo to v7 with adjusted unlocked branches, * When upgrading a direct mode repo to v7 with adjusted unlocked branches,
fix a bug that prevented annex.thin from taking effect for the files fix a bug that prevented annex.thin from taking effect for the files
in working tree. in working tree.

View file

@ -271,7 +271,6 @@ file_stats f k =
remote_fast_stats :: Remote -> [Stat] remote_fast_stats :: Remote -> [Stat]
remote_fast_stats r = map (\s -> s r) remote_fast_stats r = map (\s -> s r)
[ remote_name [ remote_name
, remote_trust
, remote_cost , remote_cost
, remote_type , remote_type
] ]
@ -280,6 +279,7 @@ uuid_fast_stats :: UUID -> [Stat]
uuid_fast_stats u = map (\s -> s u) uuid_fast_stats u = map (\s -> s u)
[ repo_uuid [ repo_uuid
, repo_description , repo_description
, repo_trust
] ]
uuid_slow_stats :: UUID -> [Stat] uuid_slow_stats :: UUID -> [Stat]
@ -347,9 +347,8 @@ repo_description = simpleStat "description" . lift . Remote.prettyUUID
repo_uuid :: UUID -> Stat repo_uuid :: UUID -> Stat
repo_uuid = simpleStat "uuid" . pure . fromUUID repo_uuid = simpleStat "uuid" . pure . fromUUID
remote_trust :: Remote -> Stat repo_trust :: UUID -> Stat
remote_trust r = simpleStat "trust" $ lift $ repo_trust u = simpleStat "trust" $ lift $ showTrustLevel <$> lookupTrust u
showTrustLevel <$> lookupTrust (Remote.uuid r)
remote_cost :: Remote -> Stat remote_cost :: Remote -> Stat
remote_cost r = simpleStat "cost" $ pure $ remote_cost r = simpleStat "cost" $ pure $