aura new: skip git init inside an existing git work tree (embedded-gitlink friction) #182
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
aura newscaffolder runs a best-effortgit initin the new project directory. When the project is created inside an existing git work tree — the explicitly supported authoring case (the emittedCargo.tomlcarries an empty[workspace]table precisely so a project builds under the engine tree) — the nested.gitmakes the parent repository see the project as an embedded gitlink, whichgit addwarns about and which does not round-trip through clone/push.Observed by the milestone fieldtest (finding F1,
fieldtests/milestone-project-environment/FINDINGS.md, 2026-07-02): the scaffoldedmomentum-lab/project had to have its nested.gitremoved by hand before the fieldtest corpus was committable.Likely shape (derivable, small): detect an enclosing git work tree (
git rev-parse --is-inside-work-treesemantics) and skip thegit initwith a one-line note, keeping the init for the standalone case. A--no-gitflag is the heavier alternative; the auto-detect matches the best-effort spirit the scaffolder already has (init failure is non-fatal today).Resolved — shipped as the #204 fix
This issue is a duplicate of #204 (filed independently by the cycle-0107
fieldtest against the same scaffolder behaviour). The fix shipped in commit
4da47cb(pushed to main 2026-07-04) and matches the "likely shape" thisissue proposed:
aura newnow detects an enclosing git work tree(
git rev-parse --is-inside-work-tree,crates/aura-cli/src/scaffold.rs,inside_git_work_tree) and skips thegit initwith a one-line note,keeping the init for the standalone case. No
--no-gitflag was needed.Verified against the tree at
6f2cf44: the skip is in place and covered bythe scaffold tests; the milestone fieldtest (fieldtests/milestone-research-
artifacts/) scaffolded its project inside the engine work tree without the
embedded-gitlink friction.