From db8effb8f3e861c61bc4c640d712688a8ed342e1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 6 Jun 2012 15:50:12 -0400 Subject: ignore .gitignore and .gitattributes --- Command/Watch.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Command/Watch.hs') diff --git a/Command/Watch.hs b/Command/Watch.hs index 7b714ac18..d6f77b6ae 100644 --- a/Command/Watch.hs +++ b/Command/Watch.hs @@ -43,14 +43,17 @@ start = notBareRepo $ do mvar <- liftIO $ newMVar state next $ next $ liftIO $ withINotify $ \i -> do let hook a = Just $ runAnnex mvar a - watchDir i "." (not . pruned) + watchDir i "." (ignored . takeFileName) (hook onAdd) (hook onAddSymlink) (hook onDel) (hook onDelDir) putStrLn "(started)" waitForTermination return True where - pruned dir = takeFileName dir /= ".git" + ignored ".git" = True + ignored ".gitignore" = True + ignored ".gitattributes" = True + ignored _ = False {- Runs a handler, inside the Annex monad. - -- cgit v1.2.3