summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-03-27 21:43:25 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-03-27 21:43:25 -0400
commit6b5918c295715d0599005c9367f5dab5468169c5 (patch)
treebf54f1fc8b75084d3f1ddd74c260c8521e1eb51c /Annex.hs
parent28bf28a73c503c7c2d9add38e964149355bb9e50 (diff)
some reorg and further remote generalization
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs23
1 files changed, 0 insertions, 23 deletions
diff --git a/Annex.hs b/Annex.hs
index bb26608f4..2723c6a00 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -17,12 +17,9 @@ module Annex (
queue,
queueRun,
queueRunAt,
- setConfig,
- repoConfig
) where
import Control.Monad.State
-import Data.Maybe
import qualified GitRepo as Git
import qualified GitQueue
@@ -119,23 +116,3 @@ queueRunAt n = do
state <- get
let q = repoqueue state
when (GitQueue.size q >= n) queueRun
-
-{- Changes a git config setting in both internal state and .git/config -}
-setConfig :: String -> String -> Annex ()
-setConfig k value = do
- g <- Annex.gitRepo
- liftIO $ Git.run g "config" [Param k, Param value]
- -- re-read git config and update the repo's state
- g' <- liftIO $ Git.configRead g
- Annex.changeState $ \s -> s { Annex.repo = g' }
-
-{- Looks up a per-remote config option in git config.
- - Failing that, tries looking for a global config option. -}
-repoConfig :: Git.Repo -> String -> String -> Annex String
-repoConfig r key def = do
- g <- Annex.gitRepo
- let def' = Git.configGet g global def
- return $ Git.configGet g local def'
- where
- local = "remote." ++ fromMaybe "" (Git.repoRemoteName r) ++ ".annex-" ++ key
- global = "annex." ++ key