This commit is contained in:
Joey Hess 2015-04-10 17:53:58 -04:00
parent f03473d0b1
commit 9971c82ead
4 changed files with 88 additions and 24 deletions

View file

@ -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