From 7053f5f94730cc171f677b1c267d479ba046b8b5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Jun 2012 13:30:30 -0400 Subject: handle directory deletion When a directory is deleted, or moved away, git rm -r it to stage the deletion. --- Command/Watch.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Command/Watch.hs b/Command/Watch.hs index a7553a677..abbc98ad5 100644 --- a/Command/Watch.hs +++ b/Command/Watch.hs @@ -14,6 +14,7 @@ import CmdLine import Utility.Inotify import Control.Exception as E import qualified Command.Add as Add +import qualified Git.Command import System.INotify @@ -66,4 +67,4 @@ onDel :: FilePath -> Annex () onDel file = liftIO $ print $ "del " ++ file onDelDir :: FilePath -> Annex () -onDelDir dir = liftIO $ print $ "del dir " ++ dir +onDelDir dir = inRepo $ Git.Command.run "rm" [Params "--quiet -r", File dir] -- cgit v1.2.3