builder: Point the mirror's HEAD at the main branch

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-29 00:55:10 +00:00
1 parent 8db6b0f36a
commit e9d4744a06
1 file changed
+4
+4
View File
@@ -468,6 +468,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(())
}