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(()) }