summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-20 15:17:39 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-20 15:17:39 -0400
commitf4e15e72fb12666edeefd961414c723891d84be2 (patch)
tree4907c0c03620a81b7be848d3878edf3e43ecabbd /Command
parent3d7b374f0d830cd07f3ff9531720d3263bfea6cc (diff)
trust, untrust, semitrust, dead: Warn when the trust level is overridden in .git/config.
Diffstat (limited to 'Command')
-rw-r--r--Command/Trust.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Command/Trust.hs b/Command/Trust.hs
index 6f7d6de5f..c0f013699 100644
--- a/Command/Trust.hs
+++ b/Command/Trust.hs
@@ -10,6 +10,7 @@ module Command.Trust where
import Common.Annex
import Command
import qualified Remote
+import Types.TrustLevel
import Logs.Trust
import Logs.Group
@@ -34,4 +35,7 @@ trustCommand cmd level = withWords start
trustSet uuid level
when (level == DeadTrusted) $
groupSet uuid S.empty
+ l <- lookupTrust uuid
+ when (l /= level) $
+ warning $ "This remote's trust level is locally overridden to " ++ showTrustLevel l ++ " via git config."
next $ return True