refactor
This commit is contained in:
parent
f03473d0b1
commit
9971c82ead
4 changed files with 88 additions and 24 deletions
|
@ -7,7 +7,8 @@
|
|||
|
||||
module Annex.CheckAttr (
|
||||
checkAttr,
|
||||
checkAttrHandle
|
||||
checkAttrHandle,
|
||||
checkAttrStop,
|
||||
) where
|
||||
|
||||
import Common.Annex
|
||||
|
@ -33,3 +34,10 @@ checkAttrHandle = maybe startup return =<< Annex.getState Annex.checkattrhandle
|
|||
h <- inRepo $ Git.checkAttrStart annexAttrs
|
||||
Annex.changeState $ \s -> s { Annex.checkattrhandle = Just h }
|
||||
return h
|
||||
|
||||
checkAttrStop :: Annex ()
|
||||
checkAttrStop = maybe noop stop =<< Annex.getState Annex.checkattrhandle
|
||||
where
|
||||
stop h = do
|
||||
liftIO $ Git.checkAttrStop h
|
||||
Annex.changeState $ \s -> s { Annex.checkattrhandle = Nothing }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue