Push the initial commit byre makes in an empty repo

This commit is contained in:
Ian Gulliver
2026-10-22 12:59:40 -07:00
parent b8984d30f0
commit 40fffdf839
+7
View File
@@ -92,6 +92,13 @@ func EnsureBranchCommit(ctx context.Context, repo, branch string, env []string)
if err != nil {
return err
}
_, stderr, code, err := runNetwork(ctx, repo, "push", Remote, commit+":refs/heads/"+branch)
if err != nil {
return err
}
if code != 0 {
return fmt.Errorf("pushing %s to %s: exit status %d: %s", branch, Remote, code, stderr)
}
_, err = run(ctx, repo, "update-ref", "refs/heads/"+branch, commit, "")
return err
}