diff options
author | Joey Hess <joey@kitenet.net> | 2011-11-18 13:22:48 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-11-18 13:22:48 -0400 |
commit | c50a5fbeb4f90041f16cc84bf6b39577655d42b6 (patch) | |
tree | bf8e72086c6dc5ba947c76a6eb178ba38475bd7f /Remote.hs | |
parent | 1326bb863516b5e7efbfd9fba2754a3fe7289315 (diff) |
status: Include all special remotes in the list of repositories.
Special remotes do not always have a description listed in uuid.log,
and such ones were not listed before.
Diffstat (limited to 'Remote.hs')
-rw-r--r-- | Remote.hs | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -16,6 +16,7 @@ module Remote ( hasKeyCheap, remoteTypes, + remoteMap, byName, prettyPrintUUIDs, remotesWithUUID, @@ -83,6 +84,10 @@ genList = do u <- getRepoUUID r generate t r u (M.lookup u m) +{- Map of UUIDs of Remotes and their names. -} +remoteMap :: Annex (M.Map UUID String) +remoteMap = M.fromList . map (\r -> (uuid r, name r)) <$> genList + {- Looks up a remote by name. (Or by UUID.) Only finds currently configured - git remotes. -} byName :: String -> Annex (Remote Annex) @@ -139,7 +144,6 @@ prettyPrintUUIDs desc uuids = do | d == n = d | null d = n | otherwise = n ++ " (" ++ d ++ ")" - remoteMap = M.fromList . map (\r -> (uuid r, name r)) <$> genList findlog m u = M.findWithDefault "" u m prettify m hereu u | not (null d) = fromUUID u ++ " -- " ++ d |