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
|
@ -24,6 +24,7 @@ import Git.Types (RemoteName)
|
|||
import Creds
|
||||
import Assistant.Gpg
|
||||
import Utility.Gpg (KeyId)
|
||||
import Types.GitConfig
|
||||
|
||||
import qualified Data.Map as M
|
||||
|
||||
|
@ -102,7 +103,8 @@ setupSpecialRemote' setdesc name remotetype config mcreds (mu, ss, c) = do
|
|||
- pool is drained, and as of now there's no way to tell the user
|
||||
- to perform IO actions to refill the pool. -}
|
||||
let weakc = M.insert "highRandomQuality" "false" $ M.union config c
|
||||
(c', u) <- R.setup remotetype ss mu mcreds weakc def
|
||||
dummycfg <- liftIO dummyRemoteGitConfig
|
||||
(c', u) <- R.setup remotetype ss mu mcreds weakc dummycfg
|
||||
configSet u c'
|
||||
when setdesc $
|
||||
whenM (isNothing . M.lookup u <$> uuidMap) $
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue