diff options
Diffstat (limited to 'backend')
-rw-r--r-- | backend/app/Main.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/app/Main.hs b/backend/app/Main.hs index 3fda813..8070906 100644 --- a/backend/app/Main.hs +++ b/backend/app/Main.hs @@ -124,8 +124,9 @@ watch repoT root ref = do i <- initINotify qT <- newTQueueIO _ <- - addWatch i [MoveIn] ".git/refs/heads" $ \e -> - atomically (writeTQueue qT e) + addWatch i [Create, MoveIn] ".git/refs/heads" $ \e -> do + when (e.filePath == B.fromString (takeBaseName (T.unpack ref))) do + atomically (writeTQueue qT e) forever do repo <- initRepo root ref atomically do putTMVar repoT repo |