diff options
Diffstat (limited to 'Assistant/Threads/Merger.hs')
-rw-r--r-- | Assistant/Threads/Merger.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Assistant/Threads/Merger.hs b/Assistant/Threads/Merger.hs index 0f33b68ed..663ea40ff 100644 --- a/Assistant/Threads/Merger.hs +++ b/Assistant/Threads/Merger.hs @@ -22,8 +22,8 @@ thisThread = "Merger" {- This thread watches for changes to .git/refs/heads/synced/, - which indicate incoming pushes. It merges those pushes into the - currently checked out branch. -} -mergeThread :: ThreadState -> IO () -mergeThread st = do +mergeThread :: ThreadState -> NamedThread +mergeThread st = thread $ do g <- runThreadState st $ fromRepo id let dir = Git.localGitDir g </> "refs" </> "heads" </> "synced" createDirectoryIfMissing True dir @@ -34,6 +34,8 @@ mergeThread st = do } void $ watchDir dir (const False) hooks id debug thisThread ["watching", dir] + where + thread = NamedThread thisThread type Handler = Git.Repo -> FilePath -> Maybe FileStatus -> IO () |