summaryrefslogtreecommitdiff
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
parent3d7b374f0d830cd07f3ff9531720d3263bfea6cc (diff)
trust, untrust, semitrust, dead: Warn when the trust level is overridden in .git/config.
-rw-r--r--Command/Trust.hs4
-rw-r--r--debian/changelog2
-rw-r--r--doc/bugs/trust_command_and_gitconfig_contradiction_causing_confusion.mdwn2
3 files changed, 8 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
diff --git a/debian/changelog b/debian/changelog
index 1ad914179..3d15e9f7a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,6 +16,8 @@ git-annex (5.20140211) UNRELEASED; urgency=medium
annex.numcopies cannot be honored since it's operating on keys
instead of files, make it honor the global numcopies setting,
and the annex.numcopies git config setting.
+ * trust, untrust, semitrust, dead: Warn when the trust level is
+ overridden in .git/config.
* Windows webapp: Can set up box.com, Amazon S3, and rsync.net remotes
* Windows webapp: Can create repos on removable drives.
* Windows: Ensure HOME is set, as needed by bundled cygwin utilities.
diff --git a/doc/bugs/trust_command_and_gitconfig_contradiction_causing_confusion.mdwn b/doc/bugs/trust_command_and_gitconfig_contradiction_causing_confusion.mdwn
index dc9887ff3..d67ebe66a 100644
--- a/doc/bugs/trust_command_and_gitconfig_contradiction_causing_confusion.mdwn
+++ b/doc/bugs/trust_command_and_gitconfig_contradiction_causing_confusion.mdwn
@@ -31,3 +31,5 @@ Maybe have those commands instead say "Hey, this is different than what you said
### What version of git-annex are you using? On what operating system?
5.20140127 on Debian
+
+> [[Fixed|done]], it will now warn about this situation. --[[Joey]]