aboutsummaryrefslogtreecommitdiff
path: root/Limit.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 /Limit.hs
parent025ded4a2dfb58a6ec0cb47b9d625d593a4e1977 (diff)
minor syntax changes
Diffstat (limited to 'Limit.hs')
-rw-r--r--Limit.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Limit.hs b/Limit.hs
index 3812ceea4..8dd88e72b 100644
--- a/Limit.hs
+++ b/Limit.hs
@@ -65,14 +65,13 @@ addExclude glob = addLimit $ return . notExcluded
{- Adds a limit to skip files not believed to be present
- in a specfied repository. -}
addIn :: String -> Annex ()
-addIn name = do
- u <- Remote.nameToUUID name
- addLimit $ if name == "." then check inAnnex else check (remote u)
+addIn name = addLimit $ check $ if name == "." then inAnnex else inremote
where
check a f = Backend.lookupFile f >>= handle a
handle _ Nothing = return False
handle a (Just (key, _)) = a key
- remote u key = do
+ inremote key = do
+ u <- Remote.nameToUUID name
us <- keyLocations key
return $ u `elem` us