From 895772f1e76d0cdf12eba5a579ce889d585c9072 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Sun, 13 Oct 2024 09:32:03 +0200 Subject: fix watching HEAD --- backend/app/Main.hs | 5 +++-- 1 file 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 -- cgit v1.2.3