sync with special remotes with an annex:: url
Check explicitly for an annex:: url, not just any url. While no built-in special remotes set an url, except ones that can be synced with, it seems possible that some external special remote sets an url for its own use, but did not expect it to be used by git-annex sync et al. The assistant also syncs with them.
This commit is contained in:
parent
22bf23782f
commit
58301e40d2
6 changed files with 26 additions and 7 deletions
|
@ -374,6 +374,7 @@ data RemoteGitConfig = RemoteGitConfig
|
|||
, remoteAnnexAllowUnverifiedDownloads :: Bool
|
||||
, remoteAnnexConfigUUID :: Maybe UUID
|
||||
, remoteAnnexAllowEncryptedGitRepo :: Bool
|
||||
, remoteUrl :: Maybe String
|
||||
|
||||
{- These settings are specific to particular types of remotes
|
||||
- including special remotes. -}
|
||||
|
@ -480,6 +481,12 @@ extractRemoteGitConfig r remotename = do
|
|||
, remoteAnnexExternalType = notempty $ getmaybe "externaltype"
|
||||
, remoteAnnexAllowEncryptedGitRepo =
|
||||
getbool "allow-encrypted-gitrepo" False
|
||||
, remoteUrl =
|
||||
case Git.Config.getMaybe (remoteConfig remotename "url") r of
|
||||
Just (ConfigValue b)
|
||||
| B.null b -> Nothing
|
||||
| otherwise -> Just (decodeBS b)
|
||||
_ -> Nothing
|
||||
}
|
||||
where
|
||||
getbool k d = fromMaybe d $ getmaybebool k
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue