summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-13 15:05:07 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-13 15:06:49 -0400
commit13fff71f2019ae098c3f8532ac2734cb1ab11498 (patch)
treef37714c4089df4afac9bf9724c80757e5fd29e6f /Annex
parent46588674b081cd4ea5820680d8fc15c81ed175ad (diff)
split out three modules from Git
Constructors and configuration make sense in separate modules. A separate Git.Types is needed to avoid cycles.
Diffstat (limited to 'Annex')
-rw-r--r--Annex/UUID.hs5
-rw-r--r--Annex/Version.hs4
2 files changed, 5 insertions, 4 deletions
diff --git a/Annex/UUID.hs b/Annex/UUID.hs
index e510a7ccd..48bf71f10 100644
--- a/Annex/UUID.hs
+++ b/Annex/UUID.hs
@@ -21,6 +21,7 @@ module Annex.UUID (
import Common.Annex
import qualified Git
+import qualified Git.Config
import qualified Build.SysConfig as SysConfig
import Config
@@ -55,14 +56,14 @@ getRepoUUID r = do
return u
else return c
where
- cached = toUUID . Git.configGet cachekey ""
+ cached = toUUID . Git.Config.get cachekey ""
updatecache u = do
g <- gitRepo
when (g /= r) $ storeUUID cachekey u
cachekey = remoteConfig r "uuid"
getUncachedUUID :: Git.Repo -> UUID
-getUncachedUUID = toUUID . Git.configGet configkey ""
+getUncachedUUID = toUUID . Git.Config.get configkey ""
{- Make sure that the repo has an annex.uuid setting. -}
prepUUID :: Annex ()
diff --git a/Annex/Version.hs b/Annex/Version.hs
index 9e694faf1..917859eae 100644
--- a/Annex/Version.hs
+++ b/Annex/Version.hs
@@ -8,7 +8,7 @@
module Annex.Version where
import Common.Annex
-import qualified Git
+import qualified Git.Config
import Config
type Version = String
@@ -26,7 +26,7 @@ versionField :: String
versionField = "annex.version"
getVersion :: Annex (Maybe Version)
-getVersion = handle <$> fromRepo (Git.configGet versionField "")
+getVersion = handle <$> fromRepo (Git.Config.get versionField "")
where
handle [] = Nothing
handle v = Just v