diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-04-10 17:53:58 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-04-10 17:53:58 -0400 |
commit | cd4304b64943ba55ffc8beac47796affc5405fd8 (patch) | |
tree | 889f40c6171d35364ca9fb8017581874b4e2536c /Annex/CheckIgnore.hs | |
parent | 2d99173315d757d21f1f7d7a3c65c8c49dbab6ed (diff) |
refactor
Diffstat (limited to 'Annex/CheckIgnore.hs')
-rw-r--r-- | Annex/CheckIgnore.hs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Annex/CheckIgnore.hs b/Annex/CheckIgnore.hs index 8d7df1e2c..86b46f7c2 100644 --- a/Annex/CheckIgnore.hs +++ b/Annex/CheckIgnore.hs @@ -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 |