summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Content.hs3
-rw-r--r--Annex/Queue.hs6
-rw-r--r--Annex/Ssh.hs4
-rw-r--r--Annex/UUID.hs3
-rw-r--r--Annex/Version.hs3
5 files changed, 8 insertions, 11 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs
index e0cfa7227..7bb94aec2 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -33,7 +33,6 @@ import Common.Annex
import Logs.Location
import Annex.UUID
import qualified Git
-import qualified Git.Config
import qualified Annex
import qualified Annex.Queue
import qualified Annex.Branch
@@ -308,7 +307,7 @@ saveState oneshot = do
( Annex.Branch.commit "update" , Annex.Branch.stage)
where
alwayscommit = fromMaybe True . Git.configTrue
- <$> fromRepo (Git.Config.get "annex.alwayscommit" "")
+ <$> getConfig "annex.alwayscommit" ""
{- Downloads content from any of a list of urls. -}
downloadUrl :: [Url.URLString] -> FilePath -> Annex Bool
diff --git a/Annex/Queue.hs b/Annex/Queue.hs
index df6ba12a2..f49a22069 100644
--- a/Annex/Queue.hs
+++ b/Annex/Queue.hs
@@ -14,7 +14,7 @@ module Annex.Queue (
import Common.Annex
import Annex hiding (new)
import qualified Git.Queue
-import qualified Git.Config
+import Config
{- Adds a git command to the queue. -}
add :: String -> [CommandParam] -> [FilePath] -> Annex ()
@@ -43,11 +43,11 @@ get = maybe new return =<< getState repoqueue
new :: Annex Git.Queue.Queue
new = do
- q <- Git.Queue.new <$> fromRepo queuesize
+ q <- Git.Queue.new <$> queuesize
store q
return q
where
- queuesize r = readish =<< Git.Config.getMaybe "annex.queuesize" r
+ queuesize = readish <$> getConfig "annex.queuesize" ""
store :: Git.Queue.Queue -> Annex ()
store q = changeState $ \s -> s { repoqueue = Just q }
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs
index 79cfbe908..e6cd6a926 100644
--- a/Annex/Ssh.hs
+++ b/Annex/Ssh.hs
@@ -15,7 +15,7 @@ import qualified Data.Map as M
import Common.Annex
import Annex.LockPool
import qualified Git
-import qualified Git.Config
+import Config
import qualified Build.SysConfig as SysConfig
{- Generates parameters to ssh to a given host (or user@host) on a given
@@ -47,7 +47,7 @@ sshInfo (host, port) = ifM caching
where
caching = fromMaybe SysConfig.sshconnectioncaching
. Git.configTrue
- <$> fromRepo (Git.Config.get "annex.sshcaching" "")
+ <$> getConfig "annex.sshcaching" ""
cacheParams :: FilePath -> [CommandParam]
cacheParams socketfile =
diff --git a/Annex/UUID.hs b/Annex/UUID.hs
index 0ab2e7e52..e8306de90 100644
--- a/Annex/UUID.hs
+++ b/Annex/UUID.hs
@@ -47,7 +47,7 @@ getUUID = getRepoUUID =<< gitRepo
{- Looks up a repo's UUID, caching it in .git/config if it's not already. -}
getRepoUUID :: Git.Repo -> Annex UUID
getRepoUUID r = do
- c <- fromRepo cached
+ c <- toUUID <$> getConfig cachekey ""
let u = getUncachedUUID r
if c /= u && u /= NoUUID
@@ -56,7 +56,6 @@ getRepoUUID r = do
return u
else return c
where
- cached = toUUID . Git.Config.get cachekey ""
updatecache u = do
g <- gitRepo
when (g /= r) $ storeUUID cachekey u
diff --git a/Annex/Version.hs b/Annex/Version.hs
index 917859eae..cf5d22484 100644
--- a/Annex/Version.hs
+++ b/Annex/Version.hs
@@ -8,7 +8,6 @@
module Annex.Version where
import Common.Annex
-import qualified Git.Config
import Config
type Version = String
@@ -26,7 +25,7 @@ versionField :: String
versionField = "annex.version"
getVersion :: Annex (Maybe Version)
-getVersion = handle <$> fromRepo (Git.Config.get versionField "")
+getVersion = handle <$> getConfig versionField ""
where
handle [] = Nothing
handle v = Just v