aboutsummaryrefslogtreecommitdiff
path: root/Remote.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-10-11 14:43:45 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-10-11 14:43:45 -0400
commitb505ba83e8b62a9ed0ec2fb96448c5fc801184d9 (patch)
tree664eb4af9f274dfc13eb9abfab86421ebe38e881 /Remote.hs
parent025ded4a2dfb58a6ec0cb47b9d625d593a4e1977 (diff)
minor syntax changes
Diffstat (limited to 'Remote.hs')
-rw-r--r--Remote.hs12
1 files changed, 5 insertions, 7 deletions
diff --git a/Remote.hs b/Remote.hs
index 27ebd724a..b1305b9e0 100644
--- a/Remote.hs
+++ b/Remote.hs
@@ -78,7 +78,7 @@ genList = do
enumerate t >>=
mapM (gen m t)
gen m t r = do
- u <- getUUID r
+ u <- getRepoUUID r
generate t r u (M.lookup u m)
{- Looks up a remote by name. (Or by UUID.) Only finds currently configured
@@ -104,7 +104,7 @@ byName' n = do
- and returns its UUID. Finds even remotes that are not configured in
- .git/config. -}
nameToUUID :: String -> Annex UUID
-nameToUUID "." = getUUID =<< gitRepo -- special case for current repo
+nameToUUID "." = getUUID -- special case for current repo
nameToUUID n = do
res <- byName' n
case res of
@@ -129,7 +129,7 @@ nameToUUID n = do
- of the UUIDs. -}
prettyPrintUUIDs :: String -> [UUID] -> Annex String
prettyPrintUUIDs desc uuids = do
- here <- getUUID =<< gitRepo
+ here <- getUUID
m <- M.unionWith addname <$> uuidMap <*> remoteMap
maybeShowJSON [(desc, map (jsonify m here) uuids)]
return $ unwords $ map (\u -> "\t" ++ prettify m here u ++ "\n") uuids
@@ -178,8 +178,7 @@ keyPossibilitiesTrusted = keyPossibilities' True
keyPossibilities' :: Bool -> Key -> Annex ([Remote Annex], [UUID])
keyPossibilities' withtrusted key = do
- g <- gitRepo
- u <- getUUID g
+ u <- getUUID
trusted <- if withtrusted then trustGet Trusted else return []
-- get uuids of all remotes that are recorded to have the key
@@ -198,8 +197,7 @@ keyPossibilities' withtrusted key = do
{- Displays known locations of a key. -}
showLocations :: Key -> [UUID] -> Annex ()
showLocations key exclude = do
- g <- gitRepo
- u <- getUUID g
+ u <- getUUID
uuids <- keyLocations key
untrusteduuids <- trustGet UnTrusted
let uuidswanted = filteruuids uuids (u:exclude++untrusteduuids)