summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-11-08 16:40:02 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-11-08 16:40:02 -0400
commitc281747b0eb39c10eb7bae0ea3202dca6077b74f (patch)
treecb252056cf29f9ea5dd6e94e022a223ac375c175
parent070e8530c1151dc96dec099eac8b967277751b10 (diff)
add queueRun
-rw-r--r--Annex.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Annex.hs b/Annex.hs
index 7c046b141..af761051d 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -20,6 +20,7 @@ module Annex (
Flag(..),
queue,
queueGet,
+ queueRun,
setConfig
) where
@@ -120,6 +121,15 @@ queueGet = do
state <- get
return (Internals.repoqueue state)
+{- Runs (and empties) the queue. -}
+queueRun :: Annex ()
+queueRun = do
+ state <- get
+ let q = Internals.repoqueue state
+ g <- gitRepo
+ liftIO $ GitQueue.run g q
+ put state { Internals.repoqueue = GitQueue.empty }
+
{- Changes a git config setting in both internal state and .git/config -}
setConfig :: String -> String -> Annex ()
setConfig key value = do