createInitialCommit creates an empty commit with the environment creation message - this prevents multiple environments from overwriting the container-use-state on the parent commit
(ctx context.Context, worktreePath, id, title string)
| 203 | |
| 204 | // createInitialCommit creates an empty commit with the environment creation message - this prevents multiple environments from overwriting the container-use-state on the parent commit |
| 205 | func (r *Repository) createInitialCommit(ctx context.Context, worktreePath, id, title string) error { |
| 206 | commitMessage := fmt.Sprintf("Create environment %s: %s", id, title) |
| 207 | _, err := RunGitCommand(ctx, worktreePath, "commit", "--allow-empty", "-m", commitMessage) |
| 208 | return err |
| 209 | } |
| 210 | |
| 211 | func (r *Repository) propagateToWorktree(ctx context.Context, env *environment.Environment, explanation string) (rerr error) { |
| 212 | slog.Info("Propagating to worktree...", |