You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: support coordinated feature branching across nested independent git repos
Add auto-detection of nested independent git repositories (not submodules)
and create matching feature branches in each when running create-new-feature.
Changes:
- common.sh: Add find_nested_git_repos() - discovers nested repos up to 2 levels deep
- common.ps1: Add Find-NestedGitRepos - PowerShell equivalent
- create-new-feature.sh: Create feature branches in all nested repos after root
- create-new-feature.ps1: Same for PowerShell
- specify.md: Document NESTED_REPOS JSON output field
- test_nested_repos.py: 9 tests covering discovery and branch creation
Design decisions:
- Auto-detect via .git presence (no configuration required)
- Non-blocking: nested repo failures are warnings, not errors
- JSON output extended with NESTED_REPOS array [{path, status}]
- Backward-compatible: no change for single-repo workflows
Resolves#2120
Related to #1050
Note: This contribution was made with AI assistance (GitHub Copilot).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: templates/commands/specify.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,8 +89,9 @@ Given that feature description, do this:
89
89
- Always include the JSON flag (`--json` for Bash, `-Json` for PowerShell) so the output can be parsed reliably
90
90
- You must only ever run this script once per feature
91
91
- The JSON is provided in the terminal as output - always refer to it to get the actual content you're looking for
92
-
- The JSON output will contain BRANCH_NAME and SPEC_FILE paths
92
+
- The JSON output will contain BRANCH_NAME, SPEC_FILE paths, and NESTED_REPOS (an array of nested independent git repositories where the feature branch was also created)
93
93
- For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot")
94
+
- **Nested git repos**: The script auto-detects subdirectories with their own `.git` (up to 2 levels deep) and creates the same feature branch in each. The JSON output includes a `NESTED_REPOS` array with `path` and `status` (`created`, `existing`, `dry_run`, or `failed`) for each nested repo. Failures in nested repos are warnings and do not block the main workflow.
94
95
95
96
3. Load `templates/spec-template.md` to understand required sections.
0 commit comments