summaryrefslogtreecommitdiff
path: root/Remote.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-11-18 13:22:48 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-11-18 13:22:48 -0400
commitc50a5fbeb4f90041f16cc84bf6b39577655d42b6 (patch)
treebf8e72086c6dc5ba947c76a6eb178ba38475bd7f /Remote.hs
parent1326bb863516b5e7efbfd9fba2754a3fe7289315 (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.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Remote.hs b/Remote.hs
index 7c0362d2a..b1be60ec4 100644
--- a/Remote.hs
+++ b/Remote.hs
@@ -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