diff options
author | Joey Hess <joey@kitenet.net> | 2011-05-15 15:27:49 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-05-15 15:27:49 -0400 |
commit | 6aab88fa251a14fbf31c7a8d80296c78db0ed048 (patch) | |
tree | 34465a5c706ab825ecd34b9261ecc6f35e4dd555 /UUID.hs | |
parent | 1e5beda86a1d0185466547bd1acb61a75ac66992 (diff) |
more monadic operator use
Diffstat (limited to 'UUID.hs')
-rw-r--r-- | UUID.hs | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -79,8 +79,7 @@ getUncachedUUID r = Git.configGet r configkey "" {- Make sure that the repo has an annex.uuid setting. -} prepUUID :: Annex () prepUUID = do - g <- Annex.gitRepo - u <- getUUID g + u <- getUUID =<< Annex.gitRepo when ("" == u) $ do uuid <- liftIO $ genUUID setConfig configkey uuid @@ -88,8 +87,7 @@ prepUUID = do {- Pretty-prints a list of UUIDs -} prettyPrintUUIDs :: [UUID] -> Annex String prettyPrintUUIDs uuids = do - g <- Annex.gitRepo - here <- getUUID g + here <- getUUID =<< Annex.gitRepo m <- uuidMap return $ unwords $ map (\u -> "\t" ++ prettify m u here ++ "\n") uuids where |