GETCONFIG name fix
Fix regression that prevented external special remotes from using GETCONFIG to query values like "name". (Introduced in version 7.20200202.7.)
This commit is contained in:
parent
d9bd645bf8
commit
6a91471923
4 changed files with 8 additions and 4 deletions
|
@ -1,5 +1,7 @@
|
|||
git-annex (8.20200227) UNRELEASED; urgency=medium
|
||||
|
||||
* Fix regression that prevented external special remotes from using
|
||||
GETCONFIG to query values like "name". (Introduced in version 7.20200202.7.)
|
||||
* Improve behavior when a directory git-annex is writing to gets
|
||||
unmounted. Previously it could in some cases re-create the mount point
|
||||
and directory tree, and even write object contents to the wrong disk.
|
||||
|
|
|
@ -424,9 +424,9 @@ handleRequest' st external req mp responsehandler
|
|||
modifyTVar' (externalConfigChanges st) $ \f ->
|
||||
f . M.insert (Accepted setting) (Accepted value)
|
||||
handleRemoteRequest (GETCONFIG setting) = do
|
||||
value <- fromMaybe ""
|
||||
value <- maybe "" fromProposedAccepted
|
||||
. (M.lookup (Accepted setting))
|
||||
. getRemoteConfigPassedThrough
|
||||
. unparsedRemoteConfig
|
||||
<$> liftIO (atomically $ readTVar $ externalConfig st)
|
||||
send $ VALUE value
|
||||
handleRemoteRequest (SETCREDS setting login password) = case (externalUUID external, externalGitConfig external) of
|
||||
|
|
|
@ -23,8 +23,9 @@ type RemoteConfig = M.Map RemoteConfigField (ProposedAccepted String)
|
|||
|
||||
{- Before being used a RemoteConfig has to be parsed. -}
|
||||
data ParsedRemoteConfig = ParsedRemoteConfig
|
||||
(M.Map RemoteConfigField RemoteConfigValue)
|
||||
RemoteConfig
|
||||
{ parsedRemoteConfigMap :: M.Map RemoteConfigField RemoteConfigValue
|
||||
, unparsedRemoteConfig :: RemoteConfig
|
||||
}
|
||||
|
||||
{- Remotes can have configuration values of many types, so use Typeable
|
||||
- to let them all be stored in here. -}
|
||||
|
|
|
@ -18,3 +18,4 @@ There is no day that ends without me being grateful for git-annex ;-)
|
|||
[[!meta author=mih]]
|
||||
[[!tag projects/datalad]]
|
||||
|
||||
> [[fixed|done]] --[[Joey]]
|
||||
|
|
Loading…
Reference in a new issue