summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Branch.hs4
-rw-r--r--Annex/UUID.hs6
2 files changed, 6 insertions, 4 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs
index e551bfcd0..8e7f45a4a 100644
--- a/Annex/Branch.hs
+++ b/Annex/Branch.hs
@@ -164,9 +164,7 @@ get' staleok file = fromcache =<< getCache file
fromjournal Nothing
| staleok = withIndex frombranch
| otherwise = withIndexUpdate $ frombranch >>= cache
- frombranch = do
- liftIO $ putStrLn $ "frombranch " ++ file
- L.unpack <$> catFile fullname file
+ frombranch = L.unpack <$> catFile fullname file
cache content = do
setCache file content
return content
diff --git a/Annex/UUID.hs b/Annex/UUID.hs
index 517840fba..1d2175bcb 100644
--- a/Annex/UUID.hs
+++ b/Annex/UUID.hs
@@ -20,6 +20,8 @@ module Annex.UUID (
removeRepoUUID,
) where
+import System.Process
+
import Common.Annex
import qualified Git
import qualified Git.Config
@@ -32,8 +34,10 @@ configkey = annexConfig "uuid"
{- Generates a UUID. There is a library for this, but it's not packaged,
- so use the command line tool. -}
genUUID :: IO UUID
-genUUID = pOpen ReadFromPipe command params $ liftM toUUID . hGetLine
+genUUID = gen . lines <$> readProcess command params []
where
+ gen [] = error $ "no output from " ++ command
+ gen (l:_) = toUUID l
command = SysConfig.uuid
params
-- request a random uuid be generated