diff options
Diffstat (limited to 'Remote/Git.hs')
-rw-r--r-- | Remote/Git.hs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs index 183fcd854..e9919e636 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -34,7 +34,18 @@ remote = RemoteType { list :: Annex [Git.Repo] list = do g <- gitRepo - return $ Git.remotes g + let c = Git.configMap g + mapM (tweakurl c) $ Git.remotes g + where + annexurl n = "remote." ++ n ++ ".annexurl" + tweakurl c r = do + let n = fromJust $ Git.repoRemoteName r + case M.lookup (annexurl n) c of + Nothing -> return r + Just url -> do + g <- gitRepo + r' <- liftIO $ Git.genRemote g url + return $ Git.repoRemoteNameSet r' n gen :: Git.Repo -> UUID -> Maybe RemoteConfig -> Annex (Remote Annex) gen r u _ = do |