summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-02-28 16:10:16 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-02-28 16:18:55 -0400
commitfcdc4797a9ab2b792a9bb20f2ca9802b8f6d5a1e (patch)
tree0471848c11df7c1481d8c735eab1280d7684eddc /Annex.hs
parent7e5678bcf7cd78bd04520117201be37dc9d4d544 (diff)
use ShellParam type
So, I have a type checked safe handling of filenames starting with dashes, throughout the code.
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Annex.hs b/Annex.hs
index 5496ada67..cb662a130 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -24,6 +24,7 @@ import Control.Monad.State
import qualified GitRepo as Git
import qualified GitQueue
import qualified BackendTypes
+import Utility
-- git-annex's monad
type Annex = StateT AnnexState IO
@@ -91,7 +92,7 @@ gitRepo :: Annex Git.Repo
gitRepo = getState repo
{- Adds a git command to the queue. -}
-queue :: String -> [String] -> FilePath -> Annex ()
+queue :: String -> [ShellParam] -> FilePath -> Annex ()
queue command params file = do
state <- get
let q = repoqueue state
@@ -110,7 +111,7 @@ queueRun = do
setConfig :: String -> String -> Annex ()
setConfig k value = do
g <- Annex.gitRepo
- liftIO $ Git.run g ["config", k, value]
+ 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' }