add git queue to Annex monad

not used anywhere just yet..
This commit is contained in:
Joey Hess 2010-10-26 15:59:50 -04:00
parent 4cda7b6e7c
commit ef26076a5a
4 changed files with 112 additions and 7 deletions

View file

@ -14,6 +14,7 @@ import Locations
import LocationLog
import UUID
import qualified GitRepo as Git
import qualified GitQueue
import qualified Annex
import Utility
@ -30,6 +31,14 @@ shutdown :: Annex Bool
shutdown = do
g <- Annex.gitRepo
-- Runs all queued git commands.
q <- Annex.queueGet
if (q == GitQueue.empty)
then return ()
else do
liftIO $ putStrLn "Recording state in git..."
liftIO $ GitQueue.run g q
liftIO $ Git.run g ["add", gitStateDir g]
-- clean up any files left in the temp directory, but leave