gcrypt inherits shellescape setting from rsync, allow it

This commit is contained in:
Joey Hess 2020-01-20 15:13:49 -04:00
parent 923230ea30
commit 201049cf93
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 12 additions and 5 deletions

View file

@ -66,8 +66,9 @@ remote = specialRemoteType $ RemoteType
-- and will call our gen on them. -- and will call our gen on them.
, enumerate = const (return []) , enumerate = const (return [])
, generate = gen , generate = gen
, configParser = mkRemoteConfigParser , configParser = mkRemoteConfigParser $
[optionalStringParser gitRepoField] Remote.Rsync.rsyncRemoteConfigs ++
[ optionalStringParser gitRepoField ]
, setup = gCryptSetup , setup = gCryptSetup
, exportSupported = exportUnsupported , exportSupported = exportUnsupported
, importSupported = importUnsupported , importSupported = importUnsupported

View file

@ -14,6 +14,7 @@ module Remote.Rsync (
remove, remove,
checkKey, checkKey,
withRsyncScratchDir, withRsyncScratchDir,
rsyncRemoteConfigs,
genRsyncOpts, genRsyncOpts,
RsyncOpts RsyncOpts
) where ) where
@ -51,9 +52,8 @@ remote = specialRemoteType $ RemoteType
{ typename = "rsync" { typename = "rsync"
, enumerate = const (findSpecialRemotes "rsyncurl") , enumerate = const (findSpecialRemotes "rsyncurl")
, generate = gen , generate = gen
, configParser = mkRemoteConfigParser , configParser = mkRemoteConfigParser $ rsyncRemoteConfigs ++
[ yesNoParser shellEscapeField True [ optionalStringParser rsyncUrlField
, optionalStringParser rsyncUrlField
] ]
, setup = rsyncSetup , setup = rsyncSetup
, exportSupported = exportIsSupported , exportSupported = exportIsSupported
@ -123,6 +123,12 @@ gen r u c gc rs = do
-- Rsync displays its own progress. -- Rsync displays its own progress.
{ displayProgress = False } { displayProgress = False }
-- Things used by genRsyncOpts
rsyncRemoteConfigs :: [RemoteConfigFieldParser]
rsyncRemoteConfigs =
[ yesNoParser shellEscapeField True
]
genRsyncOpts :: ParsedRemoteConfig -> RemoteGitConfig -> Annex [CommandParam] -> RsyncUrl -> RsyncOpts genRsyncOpts :: ParsedRemoteConfig -> RemoteGitConfig -> Annex [CommandParam] -> RsyncUrl -> RsyncOpts
genRsyncOpts c gc transport url = RsyncOpts genRsyncOpts c gc transport url = RsyncOpts
{ rsyncUrl = url { rsyncUrl = url