add git queue to Annex monad
not used anywhere just yet..
This commit is contained in:
parent
4cda7b6e7c
commit
ef26076a5a
4 changed files with 112 additions and 7 deletions
9
Core.hs
9
Core.hs
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue