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
fix: address all PR review comments for git extension
- Fix bash common.sh sourcing: check .specify/scripts/bash/ first, then
scripts/bash/, with explicit error if neither found
- Fix PowerShell common.ps1 sourcing: use $fallbackRoot for reliable
path resolution, with explicit error if not found
- Remove undocumented branch_template and auto_fetch from extension.yml
defaults and config-template.yml (scripts don't use them yet)
- Remove unused ExtensionError import in _install_bundled_git_extension
- Remove undocumented SPECKIT_GIT_BRANCH_NUMBERING env var from README
- Fix specify.md: skip step 2 when before_specify hook already executed
- Fix specify.md: add explicit FEATURE_DIR/SPEC_FILE in disabled-git path
- Fix specify.md: add PowerShell path to script resolution
- Add tests for git extension auto-install during specify init
Co-authored-by: mnriem <15701806+mnriem@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/spec-kit/sessions/008835a0-7778-40bb-bdb2-4182b22be315
2. **Create the feature branch** by running the script with `--short-name` (and `--json`). In sequential mode, do NOT pass `--number` — the script auto-detects the next available number. In timestamp mode, the script generates a `YYYYMMDD-HHMMSS` prefix automatically:
76
+
2. **Create the feature branch** (unless already handled by a `before_specify` hook — see Pre-Execution Checks above). If a mandatory `before_specify` hook for `speckit.git.feature` already executed and created the branch, **skip this step entirely** and use the branch/spec information from the hook result. Otherwise:
77
77
78
78
**Git extension check**: Before running the branch creation script, check if the git extension is enabled:
79
79
- Check if `.specify/extensions/.registry` exists (a single JSON file tracking all extensions)
80
80
- If it exists, read the JSON and look for `extensions.git`; verify its `"enabled"` field is `true` (or not explicitly `false`)
81
-
- If the git extension is **disabled** (explicitly `"enabled": false`), **skip branch creation entirely** — proceed directly to step 3 using a spec directory name derived from the short name (e.g., `specs/<short-name>/`)
81
+
- If the git extension is **disabled** (explicitly `"enabled": false`), **skip branch creation entirely** — do **not** run the branch creation script. Instead:
82
+
- Derive a spec directory name from the short name, e.g. `specs/<short-name>/`
83
+
- Explicitly set the following variables so later steps can use them:
- Then proceed directly to step 3 using `FEATURE_DIR` and `SPEC_FILE`
82
94
- If the registry file does not exist, proceed with branch creation using the default behavior (backward compatibility)
83
95
96
+
Run the script with `--short-name` (and `--json`). In sequential mode, do NOT pass `--number` — the script auto-detects the next available number. In timestamp mode, the script generates a `YYYYMMDD-HHMMSS` prefix automatically:
97
+
84
98
**Branch numbering mode**: Before running the script, determine the branch numbering strategy:
85
99
1. Check `.specify/extensions/git/git-config.yml` for `branch_numbering` value (extension config takes precedence)
86
100
2. If not found, check `.specify/init-options.json` for `branch_numbering` value (backward compatibility)
@@ -89,8 +103,8 @@ Given that feature description, do this:
89
103
- If `"sequential"` or absent, do not add any extra flag (default behavior)
90
104
91
105
**Script resolution**: Use the extension's bundled scripts when available, falling back to core scripts:
92
-
- If `.specify/extensions/git/scripts/bash/create-new-feature.sh` exists, use it
93
-
- Otherwise, fall back to `{SCRIPT}`
106
+
- **Bash**: If `.specify/extensions/git/scripts/bash/create-new-feature.sh` exists, use it; otherwise, fall back to `{SCRIPT}`
107
+
- **PowerShell**: If `.specify/extensions/git/scripts/powershell/create-new-feature.ps1` exists, use it; otherwise, fall back to `{SCRIPT}`
94
108
95
109
- Bash example: `{SCRIPT} --json --short-name "user-auth" "Add user authentication"`
0 commit comments