| 376 | } |
| 377 | |
| 378 | func (r *Repository) revisionRange(ctx context.Context, env *environment.EnvironmentInfo) (string, error) { |
| 379 | mergeBase, err := r.mergeBase(ctx, env) |
| 380 | if err != nil { |
| 381 | return "", err |
| 382 | } |
| 383 | envGitRef := fmt.Sprintf("%s/%s", containerUseRemote, env.ID) |
| 384 | return fmt.Sprintf("%s..%s", mergeBase, envGitRef), nil |
| 385 | } |
| 386 | |
| 387 | func (r *Repository) commitWorktreeChanges(ctx context.Context, worktreePath, explanation string) error { |
| 388 | return r.lockManager.WithLock(ctx, LockTypeForkRepo, func() error { |