refactor
This commit is contained in:
parent
f03473d0b1
commit
9971c82ead
4 changed files with 88 additions and 24 deletions
|
@ -8,7 +8,8 @@
|
|||
|
||||
module Annex.CheckIgnore (
|
||||
checkIgnored,
|
||||
checkIgnoreHandle
|
||||
checkIgnoreHandle,
|
||||
checkIgnoreStop
|
||||
) where
|
||||
|
||||
import Common.Annex
|
||||
|
@ -30,3 +31,11 @@ checkIgnoreHandle = maybe startup return =<< Annex.getState Annex.checkignorehan
|
|||
warning "The installed version of git is too old for .gitignores to be honored by git-annex."
|
||||
Annex.changeState $ \s -> s { Annex.checkignorehandle = Just v }
|
||||
return v
|
||||
|
||||
checkIgnoreStop :: Annex ()
|
||||
checkIgnoreStop = maybe noop stop =<< Annex.getState Annex.checkignorehandle
|
||||
where
|
||||
stop (Just h) = do
|
||||
liftIO $ Git.checkIgnoreStop h
|
||||
Annex.changeState $ \s -> s { Annex.checkignorehandle = Nothing }
|
||||
stop Nothing = noop
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue