Commit 9f0f9fdc authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Ensure test ref is "checked out" in pre_commit_run tests

parent f307ac39
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ class PreCommitRunTests(unittest.TestCase):
		Execute the test runner script, return the pre-commit arguments and the environment
		"""
		self.test_repo.command("fetch", self.repo.url, "-q", "--depth=2", f"{ref}:{ref}")
		self.test_repo.command("symbolic-ref", "HEAD", f"refs/heads/{ref}")
		env.update(
			CI_REPOSITORY_URL=self.repo.url,
			CI_DEFAULT_BRANCH=MAIN,