skip remotes with an annex:: url

These remotes are not regular git remotes, they are special remotes that
git uses git-remote-annex to access.

Sponsored-by: Jack Hill on Patreon
This commit is contained in:
Joey Hess 2024-05-07 15:01:22 -04:00
parent 947cf1c345
commit a89e8f6bad
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -92,7 +92,7 @@ list :: Bool -> Annex [Git.Repo]
list autoinit = do
c <- fromRepo Git.config
rs <- mapM (tweakurl c) =<< Annex.getGitRemotes
mapM (configRead autoinit) rs
mapM (configRead autoinit) (filter (not . isGitRemoteAnnex) rs)
where
annexurl r = remoteConfig r "annexurl"
tweakurl c r = do
@ -103,6 +103,9 @@ list autoinit = do
Git.Construct.remoteNamed n $
Git.Construct.fromRemoteLocation (Git.fromConfigValue url) False g
isGitRemoteAnnex :: Git.Repo -> Bool
isGitRemoteAnnex r = "annex::" `isPrefixOf` Git.repoLocation r
{- Git remotes are normally set up using standard git commands, not
- git-annex initremote and enableremote.
-