From 0af7ebdc2a3c8df03d5719ee59f6cc356977d108 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 1 Sep 2019 16:48:46 -0400 Subject: [PATCH] info: Display trust level when getting info on a uuid, same as on a remote. --- CHANGELOG | 1 + Command/Info.hs | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 7ea84c67fb..6960b358d7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,6 +19,7 @@ git-annex (7.20190826) UNRELEASED; urgency=medium * info: When file matching options are specified when getting info of something other than a directory, they won't have any effect, 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, fix a bug that prevented annex.thin from taking effect for the files in working tree. diff --git a/Command/Info.hs b/Command/Info.hs index 2efbc24a9a..23a8fc2899 100644 --- a/Command/Info.hs +++ b/Command/Info.hs @@ -271,7 +271,6 @@ file_stats f k = remote_fast_stats :: Remote -> [Stat] remote_fast_stats r = map (\s -> s r) [ remote_name - , remote_trust , remote_cost , remote_type ] @@ -280,6 +279,7 @@ uuid_fast_stats :: UUID -> [Stat] uuid_fast_stats u = map (\s -> s u) [ repo_uuid , repo_description + , repo_trust ] uuid_slow_stats :: UUID -> [Stat] @@ -347,9 +347,8 @@ repo_description = simpleStat "description" . lift . Remote.prettyUUID repo_uuid :: UUID -> Stat repo_uuid = simpleStat "uuid" . pure . fromUUID -remote_trust :: Remote -> Stat -remote_trust r = simpleStat "trust" $ lift $ - showTrustLevel <$> lookupTrust (Remote.uuid r) +repo_trust :: UUID -> Stat +repo_trust u = simpleStat "trust" $ lift $ showTrustLevel <$> lookupTrust u remote_cost :: Remote -> Stat remote_cost r = simpleStat "cost" $ pure $