uninit: remove unncessary ExistSuccess
That was added in 2011 to prevent writing to the git-annex branch on shutdown. But, the use of saveState causes pending git-annex branch writes to be completed before the branch is deleted. So, an unusual exit is not needed.
This commit is contained in:
parent
271f3b1ab4
commit
55dfa929d6
1 changed files with 4 additions and 5 deletions
|
@ -54,8 +54,7 @@ seek = withNothing $ do
|
||||||
withFilesInGitAnnex ww (Command.Unannex.seeker True)
|
withFilesInGitAnnex ww (Command.Unannex.seeker True)
|
||||||
=<< workTreeItems ww []
|
=<< workTreeItems ww []
|
||||||
whenM (checkok False $ commandAction $ removeAnnexDir recordok) $
|
whenM (checkok False $ commandAction $ removeAnnexDir recordok) $
|
||||||
whenM (checkok False $ commandAction $ completeUnitialize recordok) $
|
commandAction completeUnitialize
|
||||||
liftIO exitSuccess
|
|
||||||
where
|
where
|
||||||
ww = WarnUnmatchLsFiles "uninit"
|
ww = WarnUnmatchLsFiles "uninit"
|
||||||
checksymlinks recordnotok (_, f) =
|
checksymlinks recordnotok (_, f) =
|
||||||
|
@ -163,12 +162,12 @@ removeUnannexed = go []
|
||||||
s <- R.getFileStatus f
|
s <- R.getFileStatus f
|
||||||
return $ linkCount s > 1
|
return $ linkCount s > 1
|
||||||
|
|
||||||
completeUnitialize :: CommandCleanup -> CommandStart
|
completeUnitialize :: CommandStart
|
||||||
completeUnitialize recordok =
|
completeUnitialize =
|
||||||
starting ("uninit finish") (ActionItemOther Nothing) (SeekInput []) $ do
|
starting ("uninit finish") (ActionItemOther Nothing) (SeekInput []) $ do
|
||||||
uninitialize
|
uninitialize
|
||||||
removeAnnexBranch
|
removeAnnexBranch
|
||||||
next recordok
|
next $ return True
|
||||||
|
|
||||||
removeAnnexBranch :: Annex ()
|
removeAnnexBranch :: Annex ()
|
||||||
removeAnnexBranch = do
|
removeAnnexBranch = do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue