Push the initial commit byre makes in an empty repo
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user