do a cleanup commit after moving data from or to a git remote
Added Annex.cleanup, which is a general purpose interface for adding actions to run at the end. Remotes with the old git-annex-shell will commit every time, and have no commit command, so hide stderr when running the commit command.
This commit is contained in:
parent
a3c9d06a26
commit
c3fbe07d7a
5 changed files with 43 additions and 13 deletions
|
@ -12,6 +12,7 @@ module CmdLine (
|
|||
) where
|
||||
|
||||
import qualified Control.Exception as E
|
||||
import qualified Data.Map as M
|
||||
import Control.Exception (throw)
|
||||
import System.Console.GetOpt
|
||||
|
||||
|
@ -95,6 +96,7 @@ startup = return True
|
|||
shutdown :: Bool -> Annex Bool
|
||||
shutdown oneshot = do
|
||||
saveState oneshot
|
||||
sequence_ =<< M.elems <$> Annex.getState Annex.cleanup
|
||||
liftIO Git.Command.reap -- zombies from long-running git processes
|
||||
sshCleanup -- ssh connection caching
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue