Skip to content

FE-827: Orchestrator promote-back only adopts a target that is a repo root#183

Merged
kostandinang merged 1 commit into
ka/fe-827-greenfield-single-treefrom
ka/fe-829-plan-build-architect
Jun 9, 2026
Merged

FE-827: Orchestrator promote-back only adopts a target that is a repo root#183
kostandinang merged 1 commit into
ka/fe-827-greenfield-single-treefrom
ka/fe-829-plan-build-architect

Conversation

@kostandinang

Copy link
Copy Markdown
Contributor

promoteGreenfieldRun's repo check used git rev-parse --is-inside-work-tree,
which walks up — so an empty --out target nested inside an enclosing repo was
treated as that repo and silently committed into it (checkout -b + add -A +
commit on the parent). Now isGitRepoRoot compares git rev-parse --show-toplevel (realpath, for macOS /var→/private/var) to the target: only a
true repo root takes the cook/ branch path; a nested-but-empty target is
git-init'd as its own fresh repo, leaving the enclosing repo untouched.

🤖 Generated with Claude Code

promoteGreenfieldRun's repo check used `git rev-parse --is-inside-work-tree`,
which walks up — so an empty --out target nested inside an enclosing repo was
treated as that repo and silently committed into it (checkout -b + add -A +
commit on the parent). Now `isGitRepoRoot` compares `git rev-parse
--show-toplevel` (realpath, for macOS /var→/private/var) to the target: only a
true repo root takes the cook/<runId> branch path; a nested-but-empty target is
git-init'd as its own fresh repo, leaving the enclosing repo untouched.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

kostandinang commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kostandinang kostandinang merged commit b7034b5 into ka/fe-827-greenfield-single-tree Jun 9, 2026
4 checks passed
@kostandinang kostandinang deleted the ka/fe-829-plan-build-architect branch June 9, 2026 11:09
@kostandinang kostandinang changed the title FE-827: promote-back only adopts a target that is a repo root FE-827: Orchestrator promote-back only adopts a target that is a repo root Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant