diff options
author | Joey Hess <joey@kitenet.net> | 2013-01-01 13:52:47 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-01-01 13:58:14 -0400 |
commit | 18a3a186e9cdb69ee503d961d8285a341d818c48 (patch) | |
tree | d415a97f6c65e2268c948c6c2425d1b94b16df92 /Annex | |
parent | b6e3e7516dfdc054b9e1a281b2e49b392d235ee2 (diff) |
type based git config handling for remotes
Still a couple of places that use git config ad-hoc, but this is most of it
done.
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Content.hs | 4 | ||||
-rw-r--r-- | Annex/Queue.hs | 2 | ||||
-rw-r--r-- | Annex/Ssh.hs | 2 | ||||
-rw-r--r-- | Annex/Version.hs | 6 |
4 files changed, 6 insertions, 8 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs index 1f7516fe1..4c6802bf8 100644 --- a/Annex/Content.hs +++ b/Annex/Content.hs @@ -187,7 +187,7 @@ withTmp key action = do - in a destination (or the annex) printing a warning if not. -} checkDiskSpace :: Maybe FilePath -> Key -> Integer -> Annex Bool checkDiskSpace destination key alreadythere = do - reserve <- annexDiskReserve <$> Annex.getConfig + reserve <- annexDiskReserve <$> Annex.getGitConfig free <- liftIO . getDiskFree =<< dir force <- Annex.getState Annex.force case (free, keySize key) of @@ -395,7 +395,7 @@ saveState :: Bool -> Annex () saveState nocommit = doSideAction $ do Annex.Queue.flush unless nocommit $ - whenM (annexAlwaysCommit <$> Annex.getConfig) $ + whenM (annexAlwaysCommit <$> Annex.getGitConfig) $ Annex.Branch.commit "update" {- Downloads content from any of a list of urls. -} diff --git a/Annex/Queue.hs b/Annex/Queue.hs index 0f8c38ab9..a5ef60037 100644 --- a/Annex/Queue.hs +++ b/Annex/Queue.hs @@ -54,7 +54,7 @@ get = maybe new return =<< getState repoqueue new :: Annex Git.Queue.Queue new = do - q <- Git.Queue.new . annexQueueSize <$> getConfig + q <- Git.Queue.new . annexQueueSize <$> getGitConfig store q return q diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs index d3622686c..b6811858f 100644 --- a/Annex/Ssh.hs +++ b/Annex/Ssh.hs @@ -59,7 +59,7 @@ sshInfo (host, port) = ifM caching caching = return False #else caching = fromMaybe SysConfig.sshconnectioncaching - . annexSshCaching <$> Annex.getConfig + . annexSshCaching <$> Annex.getGitConfig #endif cacheParams :: FilePath -> [CommandParam] diff --git a/Annex/Version.hs b/Annex/Version.hs index 30ad957c3..6149e6fb7 100644 --- a/Annex/Version.hs +++ b/Annex/Version.hs @@ -9,6 +9,7 @@ module Annex.Version where import Common.Annex import Config +import qualified Annex type Version = String @@ -25,10 +26,7 @@ versionField :: ConfigKey versionField = annexConfig "version" getVersion :: Annex (Maybe Version) -getVersion = handle <$> getConfig versionField "" - where - handle [] = Nothing - handle v = Just v +getVersion = annexVersion <$> Annex.getGitConfig setVersion :: Annex () setVersion = setConfig versionField defaultVersion |