diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-10-13 09:32:03 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-10-13 09:32:03 +0200 |
commit | 895772f1e76d0cdf12eba5a579ce889d585c9072 (patch) | |
tree | 94432262c4abbd7edadb93b7e5ba74841a7db3da /backend/app/Main.hs | |
parent | f853cb522af81387b4face85bb58962e50651782 (diff) |
fix watching HEAD
Diffstat (limited to 'backend/app/Main.hs')
-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 |