trust, untrust, semitrust, dead: Warn when the trust level is overridden in .git/config.

This commit is contained in:
Joey Hess 2014-02-20 15:17:39 -04:00
parent 20c5bf8b41
commit 21610294da
3 changed files with 8 additions and 0 deletions

View file

@ -10,6 +10,7 @@ module Command.Trust where
import Common.Annex import Common.Annex
import Command import Command
import qualified Remote import qualified Remote
import Types.TrustLevel
import Logs.Trust import Logs.Trust
import Logs.Group import Logs.Group
@ -34,4 +35,7 @@ trustCommand cmd level = withWords start
trustSet uuid level trustSet uuid level
when (level == DeadTrusted) $ when (level == DeadTrusted) $
groupSet uuid S.empty 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 next $ return True

2
debian/changelog vendored
View file

@ -16,6 +16,8 @@ git-annex (5.20140211) UNRELEASED; urgency=medium
annex.numcopies cannot be honored since it's operating on keys annex.numcopies cannot be honored since it's operating on keys
instead of files, make it honor the global numcopies setting, instead of files, make it honor the global numcopies setting,
and the annex.numcopies git config 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 set up box.com, Amazon S3, and rsync.net remotes
* Windows webapp: Can create repos on removable drives. * Windows webapp: Can create repos on removable drives.
* Windows: Ensure HOME is set, as needed by bundled cygwin utilities. * Windows: Ensure HOME is set, as needed by bundled cygwin utilities.

View file

@ -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? ### What version of git-annex are you using? On what operating system?
5.20140127 on Debian 5.20140127 on Debian
> [[Fixed|done]], it will now warn about this situation. --[[Joey]]