diff options
author | Joey Hess <joey@kitenet.net> | 2011-10-11 14:43:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-10-11 14:43:45 -0400 |
commit | b505ba83e8b62a9ed0ec2fb96448c5fc801184d9 (patch) | |
tree | 664eb4af9f274dfc13eb9abfab86421ebe38e881 /Remote.hs | |
parent | 025ded4a2dfb58a6ec0cb47b9d625d593a4e1977 (diff) |
minor syntax changes
Diffstat (limited to 'Remote.hs')
-rw-r--r-- | Remote.hs | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -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) |