inheritable annex.securehashesonly

* init: When annex.securehashesonly has been set with git-annex config,
  copy that value to the annex.securehashesonly git config.
* config --set: As well as setting value in git-annex branch,
  set local gitconfig. This is needed especially for
  annex.securehashesonly, which is read only from local gitconfig and not
  the git-annex branch.

doc/todo/sha1_collision_embedding_in_git-annex_keys.mdwn has the
rationalle for doing it this way. There's no perfect solution; this
seems to be the least-bad one.

This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
Joey Hess 2017-02-27 16:08:16 -04:00
parent 6e0e7d885c
commit e53070c1ff
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
7 changed files with 51 additions and 10 deletions

View file

@ -9,6 +9,7 @@ module Command.Config where
import Command
import Logs.Config
import Config
cmd :: Command
cmd = noMessages $ command "config" SectionSetup
@ -52,12 +53,14 @@ seek (SetConfig name val) = commandAction $ do
showStart name val
next $ next $ do
setGlobalConfig name val
setConfig (ConfigKey name) val
return True
seek (UnsetConfig name) = commandAction $ do
allowMessages
showStart name "unset"
next $ next $ do
unsetGlobalConfig name
unsetConfig (ConfigKey name)
return True
seek (GetConfig name) = commandAction $ do
mv <- getGlobalConfig name