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
12
Remote.hs
12
Remote.hs
|
@ -26,7 +26,6 @@ module Remote (
|
|||
remoteTypes,
|
||||
remoteList,
|
||||
remoteList',
|
||||
gitSyncableRemoteType,
|
||||
remoteMap,
|
||||
remoteMap',
|
||||
uuidDescriptions,
|
||||
|
@ -61,6 +60,8 @@ module Remote (
|
|||
claimingUrl,
|
||||
claimingUrl',
|
||||
isExportSupported,
|
||||
gitSyncableRemote,
|
||||
gitSyncableRemoteType,
|
||||
) where
|
||||
|
||||
import Data.Ord
|
||||
|
@ -445,3 +446,12 @@ claimingUrl' remotefilter url = do
|
|||
fromMaybe web <$> firstM checkclaim (filter remotefilter rs)
|
||||
where
|
||||
checkclaim = maybe (pure False) (`id` url) . claimUrl
|
||||
|
||||
{- Is this a remote of a type we can sync with, or a special remote
|
||||
- with an annex:: url configured? -}
|
||||
gitSyncableRemote :: Remote -> Bool
|
||||
gitSyncableRemote r
|
||||
| gitSyncableRemoteType (remotetype r) = True
|
||||
| otherwise = case remoteUrl (gitconfig r) of
|
||||
Just u | "annex::" `isPrefixOf` u -> True
|
||||
_ -> False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue