atomic file retrieval from backends
This commit is contained in:
parent
8398b9ab4a
commit
a020b0c25c
4 changed files with 22 additions and 10 deletions
9
Core.hs
9
Core.hs
|
@ -29,6 +29,8 @@ startup flags = do
|
|||
shutdown :: Annex ()
|
||||
shutdown = do
|
||||
g <- Annex.gitRepo
|
||||
|
||||
-- handle pending commits
|
||||
nocommit <- Annex.flagIsSet NoCommit
|
||||
needcommit <- Annex.flagIsSet NeedCommit
|
||||
if (needcommit && not nocommit)
|
||||
|
@ -36,6 +38,13 @@ shutdown = do
|
|||
"git-annex log update", gitStateDir g]
|
||||
else return ()
|
||||
|
||||
-- clean up any files left in the temp directory
|
||||
let tmp = annexTmpLocation g
|
||||
exists <- liftIO $ doesDirectoryExist tmp
|
||||
if (exists)
|
||||
then liftIO $ removeDirectoryRecursive $ tmp
|
||||
else return ()
|
||||
|
||||
{- configure git to use union merge driver on state files, if it is not
|
||||
- already -}
|
||||
gitAttributes :: Git.Repo -> IO ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue