add annex-ignore-command and annex-sync-command configs
Added remote configuration settings annex-ignore-command and annex-sync-command, which are dynamic equivilants of the annex-ignore and annex-sync configurations. For this I needed a new DynamicConfig infrastructure. Its implementation should be as fast as before when there is no dynamic config, and it caches so shell commands are only run once. Note that annex-ignore-command exits nonzero when the remote should be ignored. While that may seem backwards, it allows using the same command for it as for annex-sync-command when you want to disable both. This commit was sponsored by Trenton Cronholm on Patreon.
This commit is contained in:
parent
86428f6261
commit
d39c120afa
21 changed files with 201 additions and 92 deletions
4
Test.hs
4
Test.hs
|
@ -52,6 +52,7 @@ import qualified Git.Ref
|
|||
import qualified Git.LsTree
|
||||
import qualified Git.FilePath
|
||||
import qualified Annex.Locations
|
||||
import qualified Types.GitConfig
|
||||
import qualified Types.KeySource
|
||||
import qualified Types.Backend
|
||||
import qualified Types.TrustLevel
|
||||
|
@ -1642,7 +1643,6 @@ test_crypto = do
|
|||
testscheme "pubkey"
|
||||
where
|
||||
gpgcmd = Utility.Gpg.mkGpgCmd Nothing
|
||||
encparams = (mempty :: Types.Remote.RemoteConfig, def :: Types.RemoteGitConfig)
|
||||
testscheme scheme = intmpclonerepo $ whenM (Utility.Path.inPath (Utility.Gpg.unGpgCmd gpgcmd)) $ do
|
||||
Utility.Gpg.testTestHarness gpgcmd
|
||||
@? "test harness self-test failed"
|
||||
|
@ -1698,6 +1698,8 @@ test_crypto = do
|
|||
checkScheme Types.Crypto.Hybrid = scheme == "hybrid"
|
||||
checkScheme Types.Crypto.PubKey = scheme == "pubkey"
|
||||
checkKeys cip mvariant = do
|
||||
dummycfg <- Types.GitConfig.dummyRemoteGitConfig
|
||||
let encparams = (mempty :: Types.Remote.RemoteConfig, dummycfg)
|
||||
cipher <- Crypto.decryptCipher gpgcmd encparams cip
|
||||
files <- filterM doesFileExist $
|
||||
map ("dir" </>) $ concatMap (key2files cipher) keys
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue