summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-12 15:48:00 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-12 15:48:00 -0400
commitd257bad93c4ae6f8e6ef6a9c848e63d0f46eb225 (patch)
treedf840e5983eafaf9581372ca282859fb3d583051
parente53900a54597437818d785aa6b1683b3b49d2afb (diff)
uuid type
-rw-r--r--Annex.hs2
-rw-r--r--UUID.hs6
2 files changed, 5 insertions, 3 deletions
diff --git a/Annex.hs b/Annex.hs
index af2569719..f695985e1 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -102,7 +102,7 @@ annexGetFile state file = do
annexWantFile :: State -> FilePath -> IO ()
annexWantFile state file = do error "not implemented" -- TODO
-{- Indicates a file is now wanted. -}
+{- Indicates a file is not wanted. -}
annexDropFile :: State -> FilePath -> IO ()
annexDropFile state file = do error "not implemented" -- TODO
diff --git a/UUID.hs b/UUID.hs
index 40c2330ee..4364e2070 100644
--- a/UUID.hs
+++ b/UUID.hs
@@ -15,16 +15,18 @@ import System.Cmd.Utils
import System.IO
import GitRepo
+type UUID = String
+
configkey="annex.uuid"
{- Generates a UUID. There is a library for this, but it's not packaged,
- so use the command line tool. -}
-genUUID :: IO String
+genUUID :: IO UUID
genUUID = do
pOpen ReadFromPipe "uuid" ["-m"] $ \h -> hGetLine h
{- Looks up a repo's UUID -}
-getUUID :: GitRepo -> String
+getUUID :: GitRepo -> UUID
getUUID repo = gitConfig repo "annex.uuid" ""
{- Make sure that the repo has an annex.uuid setting. -}