From e9d4744a06c9f5e9cb3b99a0ddbb86d1049b255e Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Sat, 28 Nov 2026 21:58:00 +0000 Subject: [PATCH] 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 --- src/builder.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/builder.rs b/src/builder.rs index 10683af..b7dacb4 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -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(()) }