Formats repo

This commit is contained in:
2026-05-13 22:15:55 -04:00
parent 63e034fd01
commit e0f986a5ee
6 changed files with 25 additions and 23 deletions
+7 -5
View File
@@ -41,8 +41,9 @@ rawGit args = do
testLogger :: IO Logger
testLogger = Logger <$> newMVar ()
-- | Create a temporary git repository, configure a user, make an initial
-- commit on branch "main", run the action with the repo path, then clean up.
{- | Create a temporary git repository, configure a user, make an initial
commit on branch "main", run the action with the repo path, then clean up.
-}
withTempGitRepo :: (FilePath -> IO a) -> IO a
withTempGitRepo action = withSystemTempDirectory "converge-test" $ \tmp -> do
let repo = tmp </> "repo"
@@ -56,9 +57,10 @@ withTempGitRepo action = withSystemTempDirectory "converge-test" $ \tmp -> do
_ <- runGitIn repo ["commit", "-m", "initial commit"]
action repo
-- | Create a temporary git repo with a bare remote, run the action with the
-- local repo path, then clean up. The local repo is pushed to the remote
-- so origin/main is reachable via fetch/pull.
{- | Create a temporary git repo with a bare remote, run the action with the
local repo path, then clean up. The local repo is pushed to the remote
so origin/main is reachable via fetch/pull.
-}
withTempGitRepoWithRemote :: (FilePath -> IO a) -> IO a
withTempGitRepoWithRemote action = withSystemTempDirectory "converge-test-remote" $ \tmp -> do
let remoteDir = tmp </> "remote.git"