diff --git a/CHANGELOG b/CHANGELOG index cd41f23c8f..43994931e1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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. diff --git a/Remote/External.hs b/Remote/External.hs index 0dfa449a8a..63740216fe 100644 --- a/Remote/External.hs +++ b/Remote/External.hs @@ -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 diff --git a/Types/RemoteConfig.hs b/Types/RemoteConfig.hs index 073181e27d..7b9662c958 100644 --- a/Types/RemoteConfig.hs +++ b/Types/RemoteConfig.hs @@ -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. -} diff --git a/doc/bugs/git-annex_no_longer_provides_remote_name_with_GETCONFIG_name.mdwn b/doc/bugs/git-annex_no_longer_provides_remote_name_with_GETCONFIG_name.mdwn index 53005c9ae2..ef50c87a94 100644 --- a/doc/bugs/git-annex_no_longer_provides_remote_name_with_GETCONFIG_name.mdwn +++ b/doc/bugs/git-annex_no_longer_provides_remote_name_with_GETCONFIG_name.mdwn @@ -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]]