summaryrefslogtreecommitdiff
path: root/Command/Watch.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-04 13:30:30 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-04 13:30:30 -0400
commit7053f5f94730cc171f677b1c267d479ba046b8b5 (patch)
tree0e8e213396c26034216881b802f766b72214cbc3 /Command/Watch.hs
parent23dbff4b4381628fab2827e693e8234243a63511 (diff)
handle directory deletion
When a directory is deleted, or moved away, git rm -r it to stage the deletion.
Diffstat (limited to 'Command/Watch.hs')
-rw-r--r--Command/Watch.hs3
1 files changed, 2 insertions, 1 deletions
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]