Commit d47b3e5
fix(extensions/git): platform-aware persist hint and stronger SPECIFY_INIT_DIR test
- Add a shared _persist_hint() helper in create_new_feature_branch.py
and use it for both the JSON-mode stderr hint and the human-readable
stdout hint, so there is a single place emitting the SPECIFY_FEATURE
persistence guidance. On Windows (os.name == "nt") it prints
PowerShell $env:VAR = "..." syntax; elsewhere it keeps the existing
POSIX export VAR=... syntax (parity with the bash twin).
- Rework test_specify_init_dir_resolves_target_project so SPECIFY_INIT_DIR
is the only thing that can produce the observed result: the script now
runs from a separate host_proj (no existing specs, so script/cwd-based
discovery would yield 001) while SPECIFY_INIT_DIR points at a different
target_proj that already has an existing spec (007-existing, so the
override must yield 008). The old version pointed SPECIFY_INIT_DIR at
the same project the script was installed in, so it passed even if the
env var were ignored.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent f861459 commit d47b3e5
2 files changed
Lines changed: 23 additions & 8 deletions
File tree
- extensions/git/scripts/python
- tests/extensions/git
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
| |||
598 | 605 | | |
599 | 606 | | |
600 | 607 | | |
601 | | - | |
| 608 | + | |
602 | 609 | | |
603 | 610 | | |
604 | 611 | | |
| |||
613 | 620 | | |
614 | 621 | | |
615 | 622 | | |
616 | | - | |
617 | | - | |
| 623 | + | |
| 624 | + | |
618 | 625 | | |
619 | 626 | | |
620 | 627 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
299 | 308 | | |
300 | 309 | | |
301 | | - | |
302 | 310 | | |
303 | | - | |
| 311 | + | |
304 | 312 | | |
305 | | - | |
| 313 | + | |
306 | 314 | | |
307 | 315 | | |
308 | 316 | | |
309 | | - | |
| 317 | + | |
310 | 318 | | |
311 | 319 | | |
312 | 320 | | |
| |||
0 commit comments