builder: Point the mirror's HEAD at the main branch
CI / Check (pull_request) Successful in 5m26s

The mirror only has remote branches, so its HEAD named a branch that
doesn't exist, and Nix warned that it couldn't read it on every build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jackos1998andClaude Opus 5.5 committed 2026-11-28 21:58:00 +00:00
1 parent 9765d3d9f8
commit 6c5d782a69
2 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -210,7 +210,7 @@ pkgs.testers.runNixOSTest {
status, out = machine.execute(f"su agent -c \"{env} slop deploy local.system --commit {one}\" 2>&1")
print(out)
assert status == 0, (status, out)
assert "build line one" not in out, out
assert "build line one" not in out and "warning:" not in out, out
assert "\x1b" not in out, repr(out)
for line in ["slop: built: 1 derivation in", "slop: copied to local", "slop: compared on local", "slop: activated local", "activating one"]:
assert line in out, (line, out)
+4
View File
@@ -511,6 +511,10 @@ async fn fetch_all(config: &BuilderConfig) -> Result<()> {
]))
.await
.context("fetching")?;
// Nix reads HEAD for a commit's flake; the mirror only has remote branches.
let branch = format!("refs/remotes/origin/{}", config.branch);
output(git(config, &repository).args(["symbolic-ref", "HEAD", &branch])).await?;
Ok(())
}