gitstow 0.8.0__tar.gz → 0.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gitstow-0.9.0/BACKLOG.md +54 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/CHANGELOG.md +24 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/PKG-INFO +3 -2
- {gitstow-0.8.0 → gitstow-0.9.0}/README.md +2 -1
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/user/commands.md +38 -10
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/user/concepts.md +3 -1
- {gitstow-0.8.0 → gitstow-0.9.0}/pyproject.toml +1 -1
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/__init__.py +1 -1
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/add.py +83 -61
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/config_cmd.py +6 -1
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/doctor.py +18 -1
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/exec_cmd.py +2 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/export_cmd.py +74 -54
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/helpers.py +11 -2
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/list_cmd.py +5 -4
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/migrate.py +10 -9
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/open_cmd.py +6 -4
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/pull.py +33 -8
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/remove.py +7 -10
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/search.py +2 -71
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/status.py +4 -1
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/workspace_cmd.py +9 -1
- gitstow-0.9.0/src/gitstow/core/collection_io.py +206 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/core/discovery.py +16 -5
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/core/git.py +239 -13
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/core/operations.py +4 -10
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/core/repo.py +75 -5
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/core/url_parser.py +82 -13
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/mcp/server.py +33 -41
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/skill/SKILL.md +1 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/routes/collection.py +52 -51
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/routes/dashboard.py +19 -2
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/routes/repos.py +29 -31
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/static/app.css +14 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/templates/dashboard.html +7 -1
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/templates/partials/repo_row.html +2 -1
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/conftest.py +17 -0
- gitstow-0.9.0/tests/pull_invariant.py +66 -0
- gitstow-0.9.0/tests/test_cli.py +3194 -0
- gitstow-0.9.0/tests/test_clone_staging.py +368 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/test_git.py +239 -34
- gitstow-0.9.0/tests/test_git_env.py +105 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/test_locking.py +8 -4
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/test_mcp.py +121 -3
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/test_move.py +48 -16
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/test_operations.py +30 -0
- gitstow-0.9.0/tests/test_path_rule.py +385 -0
- gitstow-0.9.0/tests/test_pull_safety.py +797 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/test_serve.py +169 -0
- gitstow-0.9.0/tests/test_url_parser.py +333 -0
- gitstow-0.8.0/BACKLOG.md +0 -44
- gitstow-0.8.0/src/gitstow/core/collection_io.py +0 -100
- gitstow-0.8.0/tests/test_cli.py +0 -1506
- gitstow-0.8.0/tests/test_url_parser.py +0 -204
- {gitstow-0.8.0 → gitstow-0.9.0}/.claude/settings.json +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/.github/workflows/ci.yml +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/.github/workflows/pages.yml +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/.github/workflows/publish.yml +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/.gitignore +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/.mailmap +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/AGENTS.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/CLAUDE.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/CODE_OF_CONDUCT.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/CONTRIBUTING.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/LICENSE +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/NOTICE +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/SECURITY.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/demo.gif +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/demo.tape +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/design_handoff_gitstow_landing/Gitstow Landing.dc.html +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/design_handoff_gitstow_landing/README.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/design_handoff_gitstow_landing/assets/demo.gif +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/design_handoff_gitstow_landing/assets/fonts/bricolage-grotesque-latin-var.woff2 +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/design_handoff_gitstow_landing/assets/fonts/jetbrains-mono-latin-var.woff2 +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/design_handoff_gitstow_landing/browser-window.jsx +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/design_handoff_gitstow_landing/screenshots/01-hero.png +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/design_handoff_gitstow_landing/screenshots/02-quick-start.png +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/design_handoff_gitstow_landing/screenshots/03-dashboard-showcase.png +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/design_handoff_gitstow_landing/screenshots/04-ai-integration.png +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/design_handoff_gitstow_landing/screenshots/05-feature-grid.png +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/design_handoff_gitstow_landing/screenshots/06-comparison.png +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/design_handoff_gitstow_landing/screenshots/07-cta-footer.png +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/building/audit-2026-07-06.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/building/implementation-plan.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/building/plans/2026-07-06-wave-1-correctness-safety.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/building/plans/2026-07-06-wave-2-status-model.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/building/plans/2026-07-06-wave-3-structure-polish.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/building/plans/2026-07-12-ui-wave-a-make-it-real.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/building/plans/2026-07-12-ui-wave-b-polish.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/building/plans/2026-07-16-move-repo-between-workspaces.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/building/roadmap.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/building/ui-audit-2026-07-12.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/superpowers/plans/2026-07-19-diff-viewer.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/superpowers/plans/2026-08-11-tailscale-ui.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/superpowers/specs/2026-07-19-diff-viewer-design.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/superpowers/specs/2026-08-11-tailscale-ui-design.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/user/configuration.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/docs/user/getting-started.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/scripts/release.sh +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/site/LICENSE.txt +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/site/NOTICE.txt +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/site/assets/demo.gif +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/site/assets/fonts/OFL-bricolage-grotesque.txt +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/site/assets/fonts/OFL-jetbrains-mono.txt +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/site/assets/fonts/bricolage-grotesque-latin-var.woff2 +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/site/assets/fonts/jetbrains-mono-latin-var.woff2 +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/site/index.html +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/site/style.css +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/__main__.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/__init__.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/diff_cmd.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/fetch.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/main.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/manage.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/onboard.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/serve.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/setup_ai.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/shell.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/skill_cmd.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/stats.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/cli/update.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/core/__init__.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/core/config.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/core/diff.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/core/locking.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/core/parallel.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/core/paths.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/core/status_model.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/core/tailscale.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/mcp/__init__.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/skill/LICENSE +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/__init__.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/routes/__init__.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/routes/pages.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/routes/system.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/routes/workspaces.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/server.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/static/dashboard.js +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/static/fonts/OFL-bricolage-grotesque.txt +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/static/fonts/OFL-jetbrains-mono.txt +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/static/fonts/bricolage-grotesque-latin-ext-var.woff2 +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/static/fonts/bricolage-grotesque-latin-var.woff2 +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/static/fonts/fonts.css +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/static/fonts/jetbrains-mono-latin-ext-var.woff2 +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/static/fonts/jetbrains-mono-latin-var.woff2 +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/static/vendor/LICENSE-htmx.txt +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/static/vendor/VENDORED.md +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/static/vendor/htmx.min.js +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/templates/_repo_drawer.html +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/templates/add_repo.html +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/templates/base.html +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/templates/partials/changes_section.html +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/templates/partials/dashboard_rows.html +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/templates/partials/diff_view.html +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/templates/partials/fetch_summary.html +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/templates/partials/no_workspaces.html +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/templates/partials/pull_summary.html +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/templates/settings.html +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/src/gitstow/web/templates/workspaces.html +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/__init__.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/test_collection_io.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/test_config.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/test_diff.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/test_onboard.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/test_repo.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/test_setup_ai.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/test_skill_install.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/test_status_model.py +0 -0
- {gitstow-0.8.0 → gitstow-0.9.0}/tests/test_tailscale.py +0 -0
gitstow-0.9.0/BACKLOG.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Backlog
|
|
2
|
+
|
|
3
|
+
Post-v0.1.0 improvements tracked here. See [GitHub Issues](https://github.com/rishmadaan/gitstow/issues) for discussion.
|
|
4
|
+
|
|
5
|
+
## Enhancements
|
|
6
|
+
|
|
7
|
+
- [x] **TUI: expand beyond read-only dashboard** (#1) — Added pull selected (P), workspace cycling (w), tag cycling (t)
|
|
8
|
+
- [x] **Shell completion for repo names** (#2) — `gitstow shell completions` for bash/zsh/fish; `--quiet` on list/tags/workspace list
|
|
9
|
+
- [x] **Network retry/resume for batch operations** (#3) — `--retry N` flag on add and pull; cleans up partial clones before retry
|
|
10
|
+
- [x] **Export format versioning and checksums** (#4) — Added `version: 1` to YAML/JSON exports; validates on import; backward-compatible with unversioned files
|
|
11
|
+
- [x] **Progress indication during long clones** (#5) — `git clone --progress`; pull shows live counter `[5/47]`
|
|
12
|
+
- [x] **Publish to PyPI** (#6) — Release workflow created (`.github/workflows/publish.yml`); publish on GitHub release
|
|
13
|
+
- [x] **Web dashboard (`gitstow ui`)** — Dark local browser UI wrapping core/ for daily repo management. FastAPI + Jinja2 + HTMX, dark + ember accent aesthetic. See [CHANGELOG.md](CHANGELOG.md) v0.2.0.
|
|
14
|
+
- [x] **Fix TUI breakage** — Resolved by retirement: the Textual TUI was removed in v0.3.0; `gitstow ui` (web dashboard) is the visual surface going forward.
|
|
15
|
+
|
|
16
|
+
## Documentation
|
|
17
|
+
|
|
18
|
+
- [x] **Record demo GIF for README** (#7) — Recorded with VHS, embedded in README
|
|
19
|
+
- [x] **Marketing landing page** — [gitstow.com](https://gitstow.com); static site in `site/`, auto-deployed by GitHub Pages on push to main
|
|
20
|
+
|
|
21
|
+
## Post-0.3.0 follow-ups
|
|
22
|
+
|
|
23
|
+
Triaged non-blocking items from the 2026-07 audit remediation (see
|
|
24
|
+
[docs/building/audit-2026-07-06.md](docs/building/audit-2026-07-06.md) for the full effort).
|
|
25
|
+
|
|
26
|
+
- [x] **URL parser: schemeless multi-dot hosts** — Fixed in 0.9.0: multi-dot hosts parse without a scheme, and Azure clone URLs now use Azure's `/_git/` and `v3/` forms. Was: `dev.azure.com/org/project/_git/repo` without
|
|
27
|
+
`https://` parses as owner/repo shorthand and builds a garbage clone URL (`_LOOKS_LIKE_HOST`
|
|
28
|
+
regex can't match a multi-dot first segment). Pre-existing; 0.3.1 candidate.
|
|
29
|
+
- [x] **Route search subprocesses through a hardened runner** — Done in 0.9.0: one `search_repo()` in `core/git.py` for CLI and MCP (shared env, `-e` pattern, glob in the git grep fallback). Was: `git grep`/`rg` in `cli/search.py`
|
|
30
|
+
and `mcp/server.py` shell raw `subprocess.run` without the `GIT_TERMINAL_PROMPT=0`/`LC_ALL=C`
|
|
31
|
+
env applied to all other git calls. Local-only operations, negligible risk — consistency cleanup.
|
|
32
|
+
- [x] **Test strengthening batch** — Done in 0.9.0: all four tests now fail against the bug they guard. Was: frozen-collapse MCP test needs two frozen same-named repos;
|
|
33
|
+
`run_bulk` missing-status retry + `on_attempt` callback untested; locking mutual-exclusion test
|
|
34
|
+
passes without a lock (use an event-based barrier); status JSON legacy-key test covers 3/13 keys.
|
|
35
|
+
- [x] **Small edges** — Fixed in 0.9.0 (the no-remote `add` case was a data-loss bug with `--retry`: the retry cleanup deleted the folder). Was: `add` on an on-disk repo with no remote falls through to a doomed clone;
|
|
36
|
+
whitespace-only `$EDITOR` raises IndexError; fully-untracked workspaces never get the untracked
|
|
37
|
+
hint (early return; `doctor` covers); dashboard vs single-row-refresh number sources diverge for
|
|
38
|
+
orphaned-workspace repos.
|
|
39
|
+
- [x] **Product call: `pull --force` escape hatch** — Added in 0.9.0 (CLI `--force`, for named repos only; a bulk `--force` is refused, and MCP has no force). Was: CLI explicit args follow the bulk skip rule
|
|
40
|
+
while a web single-row Pull click pulls unconditionally; a `--force` flag would reconcile the
|
|
41
|
+
"explicit intent" asymmetry.
|
|
42
|
+
- [x] **Product call: frozen + diverged + `--include-frozen`** — Fixed in 0.9.0: a clean "diverged" (or "local-only") skip. Was: surfaces as an ff-only error row
|
|
43
|
+
instead of a clean "diverged" skip (check `remote_state` directly in the worker if the messaging
|
|
44
|
+
matters).
|
|
45
|
+
|
|
46
|
+
## Post-0.9.0 follow-ups
|
|
47
|
+
|
|
48
|
+
- [ ] **Align MCP `add_repo` and the dashboard's Add with CLI `add` for an on-disk repo** — when the target folder is already a git repo, both register it with `remote_url` set to the URL that was asked for, without reading its real `origin`: a repo with no remote gets a guessed remote recorded, and one whose remote is a different project is registered with no mismatch error (MCP `add_repo` in `mcp/server.py`; dashboard `add_repo` in `web/routes/repos.py`, the `target.exists()` / `is_git_repo` branch). Not data loss (neither has a retry or deletes anything). CLI `add` refuses both cases since 0.9.0; share that classification so all three surfaces answer the same way.
|
|
49
|
+
- [ ] **The repo page's "Pull now" button does nothing** — `web/templates/_repo_drawer.html` renders `↓ Pull now` with no action attached, so pressing it has no effect. The planned incoming-changes viewer replaces it.
|
|
50
|
+
- [ ] **Collection imports register any existing folder without checking it** — `gitstow collection import` and the dashboard's import register an entry whose target path already exists, without checking that it is a git repo or that its `origin` matches the entry (`cli/export_cmd.py` and `web/routes/collection.py`, the `target.exists()` branch). Pre-existing; not data loss (nothing is cloned over or deleted). Share CLI `add`'s classification (not a git repo, no remote, remote mismatch) so imports refuse the same cases.
|
|
51
|
+
- [ ] **Repo identity reads `git remote get-url origin`** — that returns the URL after any `url.<base>.insteadOf` rewrite, so a repo cloned through a rewrite can look like a different repo (a false remote mismatch, or a missed "already tracked"), and a repo whose only remote is not named `origin` reads as "no remote" (`core/git.py` `get_remote_url`, used by `add`'s on-disk checks, `workspace scan` discovery, `migrate` and `open`). Pre-existing; no wrong delete. Read the configured `remote.origin.url` (or the single remote, whatever its name) instead.
|
|
52
|
+
- [ ] **`migrate --json` without `--quiet` prints progress ahead of the JSON** — the `✓ registered`, `Moving …` and `migrated` lines go to stdout before the JSON document (`cli/migrate.py`), so the output does not parse. Pre-existing. Send progress to stderr, or suppress it under `--json`, as the other commands do.
|
|
53
|
+
- [ ] **macOS CI skips the trailing-Unicode-whitespace branch names too** — `tests/test_pull_safety.py` skips both byte-name sweeps where the filesystem refuses non-UTF-8 names (macOS), which also drops the valid-UTF-8 names ending in U+3000/U+00A0/U+0085 that guard the old `.strip()` failure. Split valid-UTF-8 names from invalid-byte names and skip only the latter (0.9.0 review residue R6-C2; coverage only).
|
|
54
|
+
- [ ] **Naming a set-aside repo says "not tracked"** — `gitstow pull ../outside` prints "'../outside' not tracked. Skipping." when the entry is in repos.yaml but set aside as an unsafe path; say "'<key>' is set aside (not a safe folder path); see gitstow doctor" instead (`cli/pull.py` named-repo branch; 0.9.0 review residue R6-F1; wording only, nothing is pulled).
|
|
@@ -4,6 +4,30 @@ All notable changes to gitstow will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [0.9.0] - 2026-11-20
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **`gitstow add` can no longer delete a local repo** — if the target folder already held a git repo with no `origin` remote (one you `git init`ed yourself), `add` treated it as a fresh clone; the clone failed on the non-empty folder, and with `--retry 1` or more the retry cleanup deleted the folder, your commits with it, before cloning again. That folder is now never cloned over: `add` stops with an error that gives the exact command to add the remote (`git -C <folder> remote add origin <url>`), after which the same `gitstow add` registers it as already on disk.
|
|
12
|
+
- **A URL, a collection or an old repos.yaml entry can no longer make gitstow act on a folder outside its workspace** — a URL with a `..` path segment (like `https://github.com/../Documents`) was accepted, so `gitstow collection import` or the dashboard's import could register the folder beside the workspace as a tracked repo, and the MCP `remove_repo` tool, which unlike `gitstow remove` and the dashboard did not check where a folder was, could then delete it. URLs whose owner or repo would not be a safe folder name (a `.`, `..` or empty path segment, a segment of only dots and spaces, or a `\`, `:` or control character, so `acme//widget`, `..\Documents` and `D:` too; a control character inside the URL is refused, not silently dropped; whitespace around the whole URL is trimmed first) are now refused as invalid. Entries already in repos.yaml with such a key (accepted by older versions, or written by hand) reached further: `gitstow pull` and `gitstow exec` could act on a repo outside the workspace, `gitstow config migrate-root` could move one, and removing an entry like `./widget` could delete the workspace folder. Such an entry is now set aside when repos.yaml is read: every command ignores it, it is kept unchanged in the file, and `gitstow doctor` lists it with what to do (`gitstow list` and `gitstow status` print a one-line reminder). Every delete or move (`gitstow remove --delete`, the repo page's "Remove + delete folder", `remove_repo`, `gitstow repo move`, `gitstow config migrate-root`, and `gitstow migrate`'s destination) refuses a folder that resolves outside its workspace, also through a symlink, and `gitstow workspace scan` skips (and lists) a repo folder whose name cannot be tracked safely.
|
|
13
|
+
- **Clones never replace or delete a folder with anything in it** — every clone, from `gitstow add`, the MCP `add_repo` tool, the dashboard's Add page and both collection imports (`gitstow collection import` and the dashboard's import), now runs in a hidden staging folder beside the target and is moved into place in one step only when it is complete. If something appeared at the target in the meantime (another gitstow command, the dashboard, or your own `git clone`), that repo fails with "already exists … left untouched" and whatever is there is kept (on Linux and macOS an empty folder at the target is simply replaced, as there is nothing in it to lose; on Windows that clone stops with "already exists"); a retry or a failed clone only ever cleans up its own staging folder, so a failed clone leaves no repo folder behind. Before, a failing `gitstow add --retry` cleared its target before each retry, which could delete a folder another add had filled in the meantime, local edits included.
|
|
14
|
+
- **Pulls never overwrite your local edits or ignored files, whatever your git settings for stashing, rebasing or merge options** — a pull never auto-stashes and re-applies your edits (with `merge.autoStash`, `pull.rebase` plus `rebase.autoStash`, or `--autostash` in a branch's `branch.<name>.mergeOptions`, git did that and could leave conflict markers in a file while reporting success), never lets a branch's merge options or a `pull.twohead` strategy turn it into a squash or a merge commit (with `pull.twohead=subtree` git could even overwrite an ignored local file and report success), and never overwrites an ignored local file (like a `.env`) when upstream starts tracking that path. In every case the pull is refused and the files are left as they were. gitstow does not stop programs you have told git to run during a pull, such as hooks, clean/smudge filters (Git LFS) or helpers chosen through your environment; those run as you configured them. A branch whose name contains `=` and that has merge options set is refused, since gitstow cannot switch them off for it; pull it with git. A branch whose upstream was deleted on the remote now gets a plain message ("the upstream branch no longer exists on the remote") instead of git's raw error, and so does a detached HEAD ("not on a branch") where a single repo is pulled directly (the dashboard's row Pull, `gitstow add --update`); bulk pulls skip a detached HEAD as a local-only repo, as before. This applies to `gitstow pull`, `gitstow add --update`, the MCP `pull_repos` tool and the dashboard's Pull buttons.
|
|
15
|
+
- **Azure DevOps URLs work** — `dev.azure.com/org/project/_git/repo` typed without `https://` was read as GitHub shorthand, and even with the scheme the clone URL was built in a form Azure does not serve. Clone URLs now use Azure's documented forms (`https://dev.azure.com/org/project/_git/repo`, or `git@ssh.dev.azure.com:v3/org/project/repo` with SSH preferred; legacy `org.visualstudio.com` URLs keep HTTPS, and the legacy SSH form `org@vs-ssh.visualstudio.com:v3/org/project/repo` clones by the `ssh.dev.azure.com` form), and the SSH and HTTPS forms are recognised as the same repo. Any host with several dots (e.g. `git.example.co.uk/group/repo`) is now recognised without a scheme too. Repos added by an HTTPS Azure URL keep their folders. Repos first added by the SSH `v3/` URL keep their `v3/...` folder and stay tracked, and adding them again by either URL form now finds the existing record instead of cloning a second copy.
|
|
16
|
+
- **Adding a repo that is already tracked never clones a second copy or resets it** — `gitstow add`, the MCP `add_repo` tool and the dashboard's Add page find the existing record, also when it is tracked under another URL form, and report it under its stored name (`gitstow add --update` pulls that folder); both collection imports skip it instead of cloning a second copy. The dashboard's Add page used to re-register an already-tracked repo, resetting its tags and frozen state. A collection that lists the same repo twice (say its HTTPS and SSH URLs) now imports it once and keeps the first entry's tags and frozen state, and an entry that would land in a folder already used by a different repo (another host, or another owner in a flat workspace) is not imported instead of being registered over it: `gitstow collection import` names the conflict, and the dashboard's import banner lists it with the reason (it used to count it as failed with no reason). An exported YAML or JSON file is judged by its URLs like a URL list; it used to match entries by their stored key, which skipped such a conflict as already tracked. `gitstow collection import --dry-run` lists each entry once with what it would do. If the tracked repo's folder has been deleted, `gitstow add`, `add_repo` and the Add page now say so and name the way out (remove it from gitstow: `gitstow remove <name>`, `remove_repo`, or Remove in the row's ⋯ menu; then add it again to re-clone) instead of answering "already tracked".
|
|
17
|
+
- **`gitstow pull` and `gitstow fetch` never act on a repo around a tracked folder** — if a tracked repo's `.git` was broken or empty and its workspace sits inside another git repo (say a workspace under a folder that is itself a repo), git looked in the folders above, so `gitstow pull` could fast-forward that outer repo and write its files. gitstow now tells git to stop at the repo's own folder, and `gitstow pull` and `gitstow fetch` first check that git sees the folder as the top of its own repository, so such a repo is reported as an error and the outer repo is left untouched.
|
|
18
|
+
- **gitstow run from inside a git hook no longer touches the wrong repo** — a git hook runs with `GIT_DIR`, `GIT_WORK_TREE` and similar variables set for its own repo, and git obeys them over the folder it is run in, so a `gitstow pull` started from a hook could fast-forward the hook's repo and write its files into another repo's folder. gitstow now drops those variables from every git command it runs, and from the commands `gitstow exec` runs, so each command acts on the repo it names. Git settings passed through the environment (`GIT_CONFIG_COUNT` with `GIT_CONFIG_KEY_<n>`/`GIT_CONFIG_VALUE_<n>`, `GIT_CONFIG_PARAMETERS`, `GIT_CONFIG`) are ignored by gitstow's git commands too; put them in a git config file instead.
|
|
19
|
+
- **The dashboard shows why a single-row Pull or Fetch failed** — when git refused a Pull (to protect a local file) or a Fetch failed, the row came back as if nothing had happened. Git's message now appears in the row, under the repo name, and the last-pulled time keeps its old value; the 30-second auto-refresh waits while the message is on screen; dismiss it with ×, or filter its row out and the next refresh clears it.
|
|
20
|
+
- **`gitstow search` handles patterns that start with `-`** — `gitstow search -- -foo` searches for `-foo` instead of passing it to ripgrep or git grep as an option, and `--glob` now also filters when ripgrep is not installed (the `git grep` fallback used to ignore it). The CLI and the MCP `search_repos` tool now share one search runner that drops inherited repository variables and disables terminal credential prompts (it keeps your locale, so case-insensitive search can match non-ASCII letters where your locale supports it).
|
|
21
|
+
- **Frozen repos that split from upstream show a clean skip** — `gitstow pull --include-frozen` on a frozen repo that has diverged from its remote (or has no upstream) now reports "skipped — Diverged from remote" (or "Local-only repo") like any other repo, instead of attempting a pull that could only fail and showing it as an error.
|
|
22
|
+
- **The "untracked repos" hint now appears when nothing is tracked yet** — `gitstow list` and `gitstow status` returned early on an empty result and never suggested `gitstow workspace scan`, so a workspace whose repos were all untracked never got the nudge. `gitstow list --json` with no results no longer prints a message ahead of the JSON, and `gitstow list --json --quiet` (the form the bundled Claude skill uses) now prints JSON; it used to print plain repo names whenever anything was tracked.
|
|
23
|
+
- **A blank `$VISUAL` or `$EDITOR` no longer crashes `gitstow open`** — a whitespace-only value counts as unset, so the next editor setting or the usual fallbacks are used.
|
|
24
|
+
- **Dashboard row numbers stay put after a single-row Pull, Fetch, freeze or tag** — the refreshed row used to be numbered counting records from workspaces that are no longer configured, so it could jump to a different number than the full page showed.
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- **`gitstow pull owner/repo --force`** — also pulls the repos you name when they have modified or staged files, for when you have asked for a pull and mean it (the dashboard's single-row Pull already works this way). `--force` applies only to repos you name: `gitstow pull --force` with no names (filters such as `--tag` or `-w` do not count) stops with an error before pulling anything. Git's fast-forward-only pull still refuses any pull that would overwrite a modified file, and that refusal is reported as an error with your file untouched. Diverged and local-only repos are still skipped, and frozen repos still need `--include-frozen`.
|
|
29
|
+
- **MCP `pull_repos` rows for frozen repos now name their workspace** — `skipped_frozen` rows carry a `workspace` field, so two frozen repos with the same name in different workspaces can be told apart (the CLI's frozen rows already did this).
|
|
30
|
+
|
|
7
31
|
## [0.8.0] - 2026-09-13
|
|
8
32
|
|
|
9
33
|
### Changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: gitstow
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: A git repository library manager — clone, organize, and maintain collections of repos you learn from
|
|
5
5
|
Project-URL: Homepage, https://gitstow.com
|
|
6
6
|
Project-URL: Repository, https://github.com/rishmadaan/gitstow
|
|
@@ -129,6 +129,7 @@ gitstow pull # Update all repos across all workspaces
|
|
|
129
129
|
gitstow -w oss pull # Only update oss workspace
|
|
130
130
|
gitstow pull --tag ai # Only repos tagged 'ai'
|
|
131
131
|
gitstow pull --exclude-tag stale # Everything except stale repos
|
|
132
|
+
gitstow pull owner/repo --force # Pull this repo even with modified files (git still refuses to overwrite them)
|
|
132
133
|
gitstow status # Git status dashboard
|
|
133
134
|
gitstow -w active status --dirty # Repos with local changes in active workspace
|
|
134
135
|
gitstow diff <repo> # View a repo's uncommitted changes (staged/unstaged) — view-only
|
|
@@ -334,7 +335,7 @@ Flat workspaces skip the owner directory entirely — repos are just `workspace/
|
|
|
334
335
|
|
|
335
336
|
**Workspace directory doesn't exist** — Run `gitstow doctor` to check workspace health. Create missing directories or update the path with `gitstow workspace add`.
|
|
336
337
|
|
|
337
|
-
**`gitstow doctor`** — Run this first when something isn't working. It checks git installation, config files, and workspace integrity.
|
|
338
|
+
**`gitstow doctor`** — Run this first when something isn't working. It checks git installation, config files, and workspace integrity, and lists any repos.yaml entry it set aside because its key is not a safe folder path.
|
|
338
339
|
|
|
339
340
|
## Development
|
|
340
341
|
|
|
@@ -81,6 +81,7 @@ gitstow pull # Update all repos across all workspaces
|
|
|
81
81
|
gitstow -w oss pull # Only update oss workspace
|
|
82
82
|
gitstow pull --tag ai # Only repos tagged 'ai'
|
|
83
83
|
gitstow pull --exclude-tag stale # Everything except stale repos
|
|
84
|
+
gitstow pull owner/repo --force # Pull this repo even with modified files (git still refuses to overwrite them)
|
|
84
85
|
gitstow status # Git status dashboard
|
|
85
86
|
gitstow -w active status --dirty # Repos with local changes in active workspace
|
|
86
87
|
gitstow diff <repo> # View a repo's uncommitted changes (staged/unstaged) — view-only
|
|
@@ -286,7 +287,7 @@ Flat workspaces skip the owner directory entirely — repos are just `workspace/
|
|
|
286
287
|
|
|
287
288
|
**Workspace directory doesn't exist** — Run `gitstow doctor` to check workspace health. Create missing directories or update the path with `gitstow workspace add`.
|
|
288
289
|
|
|
289
|
-
**`gitstow doctor`** — Run this first when something isn't working. It checks git installation, config files, and workspace integrity.
|
|
290
|
+
**`gitstow doctor`** — Run this first when something isn't working. It checks git installation, config files, and workspace integrity, and lists any repos.yaml entry it set aside because its key is not a safe folder path.
|
|
290
291
|
|
|
291
292
|
## Development
|
|
292
293
|
|
|
@@ -81,18 +81,22 @@ gitstow add anthropic/claude-code --update
|
|
|
81
81
|
|
|
82
82
|
**Behavior:**
|
|
83
83
|
- Repos are added to the first configured workspace, or the workspace specified with `-w`. With none configured, `add` exits 1 with `No workspaces configured…` and clones nothing
|
|
84
|
-
- If the repo is already tracked: skips (or pulls with `--update`)
|
|
85
|
-
- If the
|
|
84
|
+
- If the repo is already tracked: skips (or pulls with `--update`). If its folder is missing on disk, it errors instead and names the way out: `gitstow -w <label> remove <key>`, then add it again to re-clone (the MCP `add_repo` tool names `remove_repo` with `<label>:<key>`, the dashboard's Add page the row's ⋯ menu Remove)
|
|
85
|
+
- If the same repo is already tracked in that workspace under another URL form (HTTPS vs SSH, or an Azure repo first added by its SSH `v3/` URL): reports it as already tracked under its stored name and folder, never clones a second copy; `--update` pulls that existing folder
|
|
86
|
+
- If the path exists on disk as a git repo whose `origin` remote matches, but isn't tracked: registers it automatically
|
|
87
|
+
- If the path exists on disk as a git repo with **no** `origin` remote (one you `git init`ed yourself): errors and never clones over it, printing the command to run inside it (`git -C <folder> remote add origin <url>`); run the same `gitstow add` again afterwards to register it
|
|
86
88
|
- If the path exists on disk with a **different** remote than the one requested: errors with a remote-mismatch message instead of silently registering — move the directory or pick another workspace
|
|
87
89
|
- If the path exists but isn't a git repo: errors
|
|
88
90
|
- Equivalent URLs passed twice in the same invocation (e.g. HTTPS and SSH forms of the same repo) are deduplicated — only the first is cloned, the rest are reported as duplicates
|
|
89
|
-
- Multiple URLs are cloned concurrently (bounded by `parallel_limit`, default 6), with per-clone retry via `--retry`
|
|
91
|
+
- Multiple URLs are cloned concurrently (bounded by `parallel_limit`, default 6), with per-clone retry via `--retry`. Each clone runs in a hidden staging folder beside the target (`.gitstow-clone-…`) and is moved into place only when complete; if something appeared at the target in the meantime (another process got there first), that repo fails with `already exists … left untouched` and whatever is there is kept (on Linux and macOS an empty folder at the target is simply replaced; on Windows that clone stops with `already exists`). A clone that fails for good leaves no repo folder behind (an empty owner folder it created may stay). If gitstow is killed mid-clone, a hidden `.gitstow-clone-…` folder may be left beside the target; it is safe to delete
|
|
92
|
+
- A URL whose owner or repo would not be a safe folder name (a `.`, `..` or empty path segment, a segment of only dots and spaces, or a `\`, `:` or control character; a control character inside the URL, such as a pasted tab, is refused rather than dropped; whitespace around the whole URL, including a trailing newline, is trimmed first) is refused as invalid, so a repo always lands inside its workspace
|
|
93
|
+
- **Limits:** clones and pulls follow symlinks you place inside a workspace (a delete or move refuses a folder that resolves outside it). gitstow does not check for two repos that map to one folder on a case-insensitive file system (`Acme/Widget` and `acme/widget`) or because Windows drops a trailing dot (`widget.` and `widget`), and a Windows reserved name (`con`, `nul`) makes the clone fail
|
|
90
94
|
|
|
91
95
|
---
|
|
92
96
|
|
|
93
97
|
### `gitstow pull`
|
|
94
98
|
|
|
95
|
-
Bulk update repos
|
|
99
|
+
Bulk update repos: `git fetch --prune`, then a fast-forward-only merge of the upstream branch.
|
|
96
100
|
|
|
97
101
|
```bash
|
|
98
102
|
gitstow pull [repos...] [flags]
|
|
@@ -109,6 +113,7 @@ gitstow pull [repos...] [flags]
|
|
|
109
113
|
| `--exclude-tag` | | Skip repos with this tag. Repeatable. |
|
|
110
114
|
| `--owner` | | Only pull repos from this owner. |
|
|
111
115
|
| `--include-frozen` | | Include frozen repos (normally skipped). |
|
|
116
|
+
| `--force` | | Also pull the named repos when they have modified or staged files. Needs repo names: without them the command stops with an error and pulls nothing (filters do not count). Git still refuses any pull that would overwrite them. |
|
|
112
117
|
| `--retry` | | Retry failed repos N times (e.g., `--retry 3`). |
|
|
113
118
|
| `--json` | `-j` | JSON output. |
|
|
114
119
|
| `--quiet` | `-q` | Suppress per-repo progress. |
|
|
@@ -128,16 +133,24 @@ gitstow pull --exclude-tag archived
|
|
|
128
133
|
# Specific repos
|
|
129
134
|
gitstow pull anthropic/claude-code facebook/react
|
|
130
135
|
|
|
131
|
-
#
|
|
136
|
+
# Pull frozen repos too
|
|
132
137
|
gitstow pull --include-frozen
|
|
138
|
+
|
|
139
|
+
# Pull a repo even though it has modified files
|
|
140
|
+
gitstow pull anthropic/claude-code --force
|
|
133
141
|
```
|
|
134
142
|
|
|
135
143
|
**Behavior:**
|
|
136
144
|
- Frozen repos are skipped (shown as "Frozen" in summary)
|
|
137
|
-
- Repos with modified or staged files are skipped — the composition is shown in the summary (e.g. "2 modified · 1 staged")
|
|
138
|
-
- Diverged repos (local and remote both have commits the other lacks) are skipped — resolve manually (rebase or merge)
|
|
145
|
+
- Repos with modified or staged files are skipped — the composition is shown in the summary (e.g. "2 modified · 1 staged"). With `--force` the repos you name are pulled (a bulk `--force` is refused); git's ff-only pull still refuses (reported as an error, files untouched) if the pull would overwrite a modified file
|
|
146
|
+
- Diverged repos (local and remote both have commits the other lacks) are skipped — resolve manually (rebase or merge). This holds with `--force`, and for frozen repos under `--include-frozen`
|
|
147
|
+
- Local-only repos (no upstream configured) are skipped, likewise
|
|
139
148
|
- Repos with only untracked files ARE pulled — an ff-only pull can't lose them
|
|
140
149
|
- Uses `--ff-only` — won't create merge commits
|
|
150
|
+
- Never overwrites your local edits or ignored files, whatever your git settings for stashing, rebasing or merge options: a pull that would replace a modified file, or an ignored local file (like a `.env`) that upstream has started tracking, is refused and reported as an error with the files left as they were. Autostash settings (`merge.autoStash`, `rebase.autoStash`), rebase settings (`pull.rebase`, `branch.<name>.rebase`), per-branch merge options (`branch.<name>.mergeOptions`) and a merge strategy set in `pull.twohead` are not used. A branch whose name contains `=` and that has merge options set is refused (pull it with git)
|
|
151
|
+
- gitstow only ever changes the repo's own folder: a tracked folder whose `.git` is broken or empty is reported as an error, never treated as part of a repo around it. gitstow tells git not to look above the folder, and before it fetches or merges it checks that git sees the folder as the top of its own repository, and otherwise leaves it untouched ("… is not the top of its own git repository; left untouched"). `gitstow fetch` makes the same check
|
|
152
|
+
- **Limits:** a pull only fast-forwards, and refuses when that would overwrite a modified, staged, untracked or ignored file. It does not stop programs you have told git to run during a pull, such as hooks (`post-merge`), clean/smudge filters (Git LFS) or helpers chosen through your environment (`GIT_EXEC_PATH`); those run as you configured them and can change files. Editing files while a pull runs can also race with it. `--prune` removes remote-tracking refs that are gone upstream, and with custom refspecs it can remove tags too
|
|
153
|
+
- A branch whose upstream was deleted on the remote is reported as "the upstream branch no longer exists on the remote". A detached HEAD is skipped as a local-only repo here; where a single repo is pulled directly (the dashboard's row Pull, `gitstow add --update`) it is reported as "not on a branch"
|
|
141
154
|
- Runs in parallel (configurable, default 6 concurrent)
|
|
142
155
|
- Updates `last_pulled` timestamp on success
|
|
143
156
|
|
|
@@ -290,6 +303,8 @@ gitstow migrate <path> [paths...]
|
|
|
290
303
|
|
|
291
304
|
Reads the remote URL from the repo, determines the owner/repo, moves the directory into your gitstow root, and registers it.
|
|
292
305
|
|
|
306
|
+
The repo you name can live anywhere, but its destination must stay inside the workspace: if the destination resolves outside it (for example through a symlinked owner folder), the repo is left where it is and reported as an error.
|
|
307
|
+
|
|
293
308
|
```bash
|
|
294
309
|
gitstow migrate ~/old-projects/some-repo
|
|
295
310
|
gitstow migrate ~/random-clones/*
|
|
@@ -389,7 +404,7 @@ gitstow search <pattern> [flags]
|
|
|
389
404
|
|------|-------|-------------|
|
|
390
405
|
| `--tag` | `-t` | Only search in repos with this tag. |
|
|
391
406
|
| `--owner` | | Only search in repos from this owner. |
|
|
392
|
-
| `--glob` | `-g` | File glob pattern (e.g., `*.py`, `*.md`). |
|
|
407
|
+
| `--glob` | `-g` | File glob pattern (e.g., `*.py`, `*.md`), or `!` in front to exclude (e.g., `'!*.md'`). Works with ripgrep and with the `git grep` fallback. |
|
|
393
408
|
| `--ignore-case` | `-i` | Case-insensitive search. |
|
|
394
409
|
| `--files` | `-l` | Only show file paths, not matching lines. |
|
|
395
410
|
| `--max` | `-m` | Max results per repo (default: 50). |
|
|
@@ -402,6 +417,7 @@ gitstow search "TODO"
|
|
|
402
417
|
gitstow search "def main" --glob "*.py"
|
|
403
418
|
gitstow search "import React" --tag frontend
|
|
404
419
|
gitstow search "error" -i --files
|
|
420
|
+
gitstow search -- -foo # A pattern that starts with "-"
|
|
405
421
|
```
|
|
406
422
|
|
|
407
423
|
---
|
|
@@ -485,6 +501,14 @@ gitstow collection import <file> [flags]
|
|
|
485
501
|
| `--shallow` | `-s` | Shallow clone imported repos. |
|
|
486
502
|
| `--dry-run` | `-n` | Show what would be imported without doing it. |
|
|
487
503
|
|
|
504
|
+
**Behavior:**
|
|
505
|
+
- A repo already tracked in its target workspace (under any URL form) is skipped instead of cloning a second copy; its tags and frozen state are left as they are
|
|
506
|
+
- A file that lists the same repo twice imports it once, with the first entry's tags and frozen state
|
|
507
|
+
- An entry whose folder is already used by a different repo (another host, or another owner in a flat workspace), either earlier in the file or already tracked, is not imported: `gitstow collection import` reports it as a conflict with the reason, and the dashboard's import banner lists it with the reason
|
|
508
|
+
- Every entry is judged by its URL, whatever the file format: an exported YAML or JSON file is treated like a URL list (the `key` stored in an exported file is not used)
|
|
509
|
+
- `--dry-run` lists every entry once with what it would do: add, skip (with the reason), conflict, or cannot add
|
|
510
|
+
- A URL whose owner or repo would not be a safe folder name (a `.`, `..` or empty path segment, a segment of only dots and spaces, or a `\`, `:` or control character; a control character inside the URL, such as a pasted tab, is refused rather than dropped; whitespace around the whole URL, including a trailing newline, is trimmed first) is refused as invalid
|
|
511
|
+
|
|
488
512
|
---
|
|
489
513
|
|
|
490
514
|
## Shell Integration
|
|
@@ -573,6 +597,8 @@ Every interactive element has a hover tooltip. There's also a `?` button in the
|
|
|
573
597
|
- **Ghost** (gray) — already up to date, has local changes, or ahead. The button still works; it just won't change anything useful. (Untracked-only local changes still pull fine — a bulk pull only skips modified/staged files.)
|
|
574
598
|
- **Disabled** — frozen, in conflict, diverged from remote, or missing on disk
|
|
575
599
|
|
|
600
|
+
If a single-row **Pull** or **Fetch** fails (git refuses to overwrite a local file, the network is down), git's message appears in red under the repo name and the *Last pull* stamp keeps its old value. Dismiss it with **×**.
|
|
601
|
+
|
|
576
602
|
**Remote Δ** (`↑ N`, `↓ N`, or `—`) reflects your *last fetch*, not live remote state. If the counts look stale, pull (or run `git fetch --all` manually) to refresh them. A `local` badge means the repo has no upstream remote — bulk pulls skip it.
|
|
577
603
|
|
|
578
604
|
**Auto-refresh every 30s** re-reads local state only:
|
|
@@ -580,7 +606,7 @@ Every interactive element has a hover tooltip. There's also a `?` button in the
|
|
|
580
606
|
- Your `~/.gitstow/repos.yaml` registry (catches `gitstow add` from another terminal)
|
|
581
607
|
- `git status` on each tracked repo (catches new local commits, branch switches, dirty files)
|
|
582
608
|
|
|
583
|
-
It does **NOT** run `git fetch`. Ahead/behind counts won't update without a pull or manual fetch.
|
|
609
|
+
It does **NOT** run `git fetch`. Ahead/behind counts won't update without a pull or manual fetch. It pauses while a row on screen shows a Pull or Fetch error, so the message stays while that row is shown. Dismiss it with ×; if you filter that row out instead, refresh resumes and the next refresh clears it.
|
|
584
610
|
|
|
585
611
|
### `gitstow update`
|
|
586
612
|
|
|
@@ -662,6 +688,8 @@ gitstow doctor
|
|
|
662
688
|
gitstow doctor --json
|
|
663
689
|
```
|
|
664
690
|
|
|
691
|
+
It also lists any repos.yaml entry that was set aside (`set_aside_records` in `--json`): a key that is not a safe folder path inside its workspace, such as `../outside` or an absolute path, which versions before 0.9.0 accepted. Every command ignores such an entry and gitstow keeps it unchanged in repos.yaml; delete it there, then add the repo again (`gitstow add <url>`, or `gitstow workspace scan <label>` for a folder already on disk). While any entry is set aside, `gitstow list` and `gitstow status` print a one-line reminder on stderr (not with `--json` or `--quiet`).
|
|
692
|
+
|
|
665
693
|
### `gitstow install-skill`
|
|
666
694
|
|
|
667
695
|
Install the Claude Code skill for AI-assisted repo management.
|
|
@@ -772,7 +800,7 @@ Scan a workspace directory to discover and register any repos that aren't yet tr
|
|
|
772
800
|
gitstow workspace scan <label>
|
|
773
801
|
```
|
|
774
802
|
|
|
775
|
-
This respects the workspace's layout mode — in `structured` workspaces it looks for `owner/repo/.git`, in `flat` workspaces it looks for `repo/.git`.
|
|
803
|
+
This respects the workspace's layout mode — in `structured` workspaces it looks for `owner/repo/.git`, in `flat` workspaces it looks for `repo/.git`. A repo folder whose name gitstow cannot track (only dots and spaces, or a `\`, `:` or control character, all legal on Linux) is skipped and listed; rename it to track it.
|
|
776
804
|
|
|
777
805
|
---
|
|
778
806
|
|
|
@@ -162,6 +162,8 @@ gitstow repo unfreeze facebook/react # Re-enable pulling
|
|
|
162
162
|
gitstow pull --include-frozen # Override for one pull
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
+
Under `--include-frozen`, a frozen repo that has diverged from its remote (or has no upstream) is skipped with the same reason as any other repo.
|
|
166
|
+
|
|
165
167
|
Frozen repos still appear in `gitstow list` and `gitstow status` (marked with `❄`).
|
|
166
168
|
|
|
167
169
|
## Discovery and Reconciliation
|
|
@@ -181,7 +183,7 @@ You can also explicitly scan a workspace to discover and register repos on disk:
|
|
|
181
183
|
One bad repo never stops operations on others. During `gitstow pull`:
|
|
182
184
|
|
|
183
185
|
- Network errors → logged, other repos keep pulling
|
|
184
|
-
-
|
|
186
|
+
- Repos with modified or staged files → skipped with the composition shown, others keep pulling (`--force` pulls the ones you name, never a bulk pull; git still refuses a pull that would overwrite a modified file)
|
|
185
187
|
- Auth failures → logged, others keep pulling
|
|
186
188
|
- Merge conflicts → logged (shouldn't happen with `--ff-only`), others keep pulling
|
|
187
189
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "gitstow"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.9.0"
|
|
8
8
|
description = "A git repository library manager — clone, organize, and maintain collections of repos you learn from"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "GPL-3.0-or-later AND BSD-2-Clause AND OFL-1.1"
|
|
@@ -6,33 +6,26 @@
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
8
|
import json
|
|
9
|
+
import os
|
|
10
|
+
import shlex
|
|
9
11
|
import sys
|
|
10
12
|
|
|
11
13
|
import typer
|
|
12
14
|
from rich.console import Console
|
|
15
|
+
from rich.markup import escape
|
|
13
16
|
|
|
14
17
|
from gitstow.cli.helpers import resolve_workspaces
|
|
15
18
|
from gitstow.core.config import load_config
|
|
16
19
|
from gitstow.core.git import clone as git_clone
|
|
17
20
|
from gitstow.core.git import get_remote_url, is_git_repo
|
|
18
21
|
from gitstow.core.parallel import run_parallel_sync
|
|
19
|
-
from gitstow.core.repo import Repo, RepoStore
|
|
20
|
-
from gitstow.core.url_parser import parse_git_url
|
|
22
|
+
from gitstow.core.repo import MISSING_FOLDER_HINT, Repo, RepoStore, target_for
|
|
23
|
+
from gitstow.core.url_parser import parse_git_url, same_repo
|
|
21
24
|
|
|
22
25
|
console = Console()
|
|
23
26
|
err_console = Console(stderr=True)
|
|
24
27
|
|
|
25
28
|
|
|
26
|
-
def _same_repo(url_a: str, url_b: str, default_host: str) -> bool:
|
|
27
|
-
"""Whether two remote URLs point at the same host/owner/repo (protocol-agnostic)."""
|
|
28
|
-
try:
|
|
29
|
-
pa = parse_git_url(url_a, default_host=default_host)
|
|
30
|
-
pb = parse_git_url(url_b, default_host=default_host)
|
|
31
|
-
except ValueError:
|
|
32
|
-
return False
|
|
33
|
-
return (pa.host, pa.owner, pa.repo) == (pb.host, pb.owner, pb.repo)
|
|
34
|
-
|
|
35
|
-
|
|
36
29
|
def add(
|
|
37
30
|
ctx: typer.Context,
|
|
38
31
|
urls: list[str] = typer.Argument(
|
|
@@ -126,20 +119,19 @@ def add(
|
|
|
126
119
|
seen_targets: dict = {} # resolved target path → repo_key (dedup within this invocation)
|
|
127
120
|
|
|
128
121
|
for parsed in parsed_urls:
|
|
129
|
-
|
|
130
|
-
if ws.layout == "flat":
|
|
131
|
-
target = root / parsed.repo
|
|
132
|
-
repo_owner = "" # Flat layout stores no owner in path
|
|
133
|
-
else:
|
|
134
|
-
target = root / parsed.owner / parsed.repo
|
|
135
|
-
repo_owner = parsed.owner
|
|
122
|
+
repo_owner, repo_key, target = target_for(parsed, ws.layout, root)
|
|
136
123
|
|
|
137
|
-
|
|
124
|
+
existing = store.find_tracked(repo_key, ws.label, parsed.clone_url, settings.default_host)
|
|
125
|
+
matched_by_remote = existing is not None and existing.key != repo_key
|
|
126
|
+
if matched_by_remote:
|
|
127
|
+
# Use that record and its folder, never clone a second copy.
|
|
128
|
+
asked_key, repo_key = repo_key, existing.key
|
|
129
|
+
target = existing.get_path(root)
|
|
138
130
|
|
|
139
131
|
# Dedup equivalent URLs within one invocation — the parallel phase must
|
|
140
|
-
# never see two workers targeting the same directory (
|
|
141
|
-
#
|
|
142
|
-
#
|
|
132
|
+
# never see two workers targeting the same directory (a wasted second
|
|
133
|
+
# clone whose publish is refused, collapsed outcome_by_key entries).
|
|
134
|
+
# Also covers register/exists branches so a second
|
|
143
135
|
# equivalent URL never double-registers.
|
|
144
136
|
resolved_target = target.resolve()
|
|
145
137
|
if resolved_target in seen_targets:
|
|
@@ -153,9 +145,14 @@ def add(
|
|
|
153
145
|
continue
|
|
154
146
|
seen_targets[resolved_target] = repo_key
|
|
155
147
|
|
|
156
|
-
existing = store.get(repo_key, workspace=ws.label)
|
|
157
|
-
|
|
158
148
|
# Already tracked in this workspace
|
|
149
|
+
if existing and not target.exists():
|
|
150
|
+
hint = MISSING_FOLDER_HINT.format(
|
|
151
|
+
key=repo_key, remove=f"gitstow -w {ws.label} remove {shlex.quote(repo_key)}")
|
|
152
|
+
results.append({"repo": repo_key, "status": "error", "error": hint})
|
|
153
|
+
if show:
|
|
154
|
+
err_console.print(f" [red]✗[/red] {escape(hint)}")
|
|
155
|
+
continue
|
|
159
156
|
if existing:
|
|
160
157
|
if update:
|
|
161
158
|
if show:
|
|
@@ -173,15 +170,19 @@ def add(
|
|
|
173
170
|
if show:
|
|
174
171
|
err_console.print(f" [red]✗[/red] {repo_key}: {pull_result.error}")
|
|
175
172
|
else:
|
|
176
|
-
|
|
173
|
+
row = {"repo": repo_key, "status": "exists"}
|
|
174
|
+
if matched_by_remote:
|
|
175
|
+
row["detail"] = f"same repo as {asked_key}, already tracked as {repo_key}"
|
|
176
|
+
results.append(row)
|
|
177
177
|
if show:
|
|
178
|
-
|
|
178
|
+
shown = f"{asked_key} already tracked as {repo_key}" if matched_by_remote else f"{repo_key} already tracked"
|
|
179
|
+
console.print(f" [yellow]○[/yellow] {shown}. Use --update to pull.")
|
|
179
180
|
continue
|
|
180
181
|
|
|
181
182
|
# Path exists on disk but not tracked
|
|
182
183
|
if target.exists() and is_git_repo(target):
|
|
183
184
|
remote = get_remote_url(target)
|
|
184
|
-
if remote and not
|
|
185
|
+
if remote and not same_repo(remote, parsed.clone_url, settings.default_host):
|
|
185
186
|
# Different remote → error and explain the conflict (never silently register).
|
|
186
187
|
results.append({
|
|
187
188
|
"repo": repo_key,
|
|
@@ -194,19 +195,37 @@ def add(
|
|
|
194
195
|
if show:
|
|
195
196
|
err_console.print(f" [red]✗[/red] {repo_key}: remote mismatch ({remote})")
|
|
196
197
|
continue
|
|
197
|
-
if remote:
|
|
198
|
-
repo
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
198
|
+
if not remote:
|
|
199
|
+
# Local-only repo: never queue it for cloning; the folder already
|
|
200
|
+
# holds the user's repo.
|
|
201
|
+
fix = f"git -C {shlex.quote(str(target))} remote add origin {shlex.quote(parsed.clone_url)}"
|
|
202
|
+
results.append({
|
|
203
|
+
"repo": repo_key,
|
|
204
|
+
"status": "error",
|
|
205
|
+
"error": (
|
|
206
|
+
f"{target} is a local git repo with no origin remote. To track it, add the remote "
|
|
207
|
+
f"inside it ({fix}) and run the same gitstow add again."
|
|
208
|
+
),
|
|
209
|
+
})
|
|
207
210
|
if show:
|
|
208
|
-
|
|
211
|
+
err_console.print(f" [red]✗[/red] {repo_key}: local git repo with no origin remote (not cloned over)")
|
|
212
|
+
err_console.print(
|
|
213
|
+
f" [dim]Hint: {escape(fix)}, then run this add again.[/dim]",
|
|
214
|
+
soft_wrap=True,
|
|
215
|
+
)
|
|
209
216
|
continue
|
|
217
|
+
repo = Repo(
|
|
218
|
+
owner=repo_owner,
|
|
219
|
+
name=parsed.repo,
|
|
220
|
+
remote_url=remote,
|
|
221
|
+
workspace=ws.label,
|
|
222
|
+
tags=list(tags),
|
|
223
|
+
)
|
|
224
|
+
store.add(repo)
|
|
225
|
+
results.append({"repo": repo_key, "status": "registered"})
|
|
226
|
+
if show:
|
|
227
|
+
console.print(f" [green]✓[/green] {repo_key} registered (already on disk)")
|
|
228
|
+
continue
|
|
210
229
|
|
|
211
230
|
# Path exists but is not a git repo
|
|
212
231
|
if target.exists() and not is_git_repo(target):
|
|
@@ -218,33 +237,15 @@ def add(
|
|
|
218
237
|
to_clone.append((parsed, target, repo_owner, repo_key))
|
|
219
238
|
|
|
220
239
|
# Phase 2 — clone concurrently (semaphore = parallel_limit), retry inside the worker
|
|
221
|
-
def _clone_worker(parsed, target, repo_key):
|
|
222
|
-
target.parent.mkdir(parents=True, exist_ok=True)
|
|
223
|
-
success, error = False, ""
|
|
224
|
-
for attempt in range(1 + retry):
|
|
225
|
-
if attempt > 0:
|
|
226
|
-
# Clean up partial clone before retrying
|
|
227
|
-
import shutil
|
|
228
|
-
if target.exists():
|
|
229
|
-
shutil.rmtree(target, ignore_errors=True)
|
|
230
|
-
success, error = git_clone(
|
|
231
|
-
url=parsed.clone_url,
|
|
232
|
-
target=target,
|
|
233
|
-
shallow=shallow,
|
|
234
|
-
branch=branch,
|
|
235
|
-
recursive=recursive,
|
|
236
|
-
timeout=settings.clone_timeout,
|
|
237
|
-
)
|
|
238
|
-
if success:
|
|
239
|
-
break
|
|
240
|
-
return {"repo": repo_key, "success": success, "error": error}
|
|
241
|
-
|
|
242
240
|
if to_clone:
|
|
243
241
|
if show:
|
|
244
242
|
plural = "s" if len(to_clone) != 1 else ""
|
|
245
243
|
console.print(f" [dim]Cloning {len(to_clone)} repo{plural} → {ws.label}...[/dim]")
|
|
246
244
|
tasks = [
|
|
247
|
-
(key, lambda p=parsed, t=target, k=key: _clone_worker(
|
|
245
|
+
(key, lambda p=parsed, t=target, k=key: _clone_worker(
|
|
246
|
+
p, t, k, retry=retry, shallow=shallow, branch=branch,
|
|
247
|
+
recursive=recursive, timeout=settings.clone_timeout,
|
|
248
|
+
))
|
|
248
249
|
for parsed, target, _owner, key in to_clone
|
|
249
250
|
]
|
|
250
251
|
clone_results = run_parallel_sync(tasks, max_concurrent=settings.parallel_limit)
|
|
@@ -316,6 +317,27 @@ def add(
|
|
|
316
317
|
raise typer.Exit(code=1)
|
|
317
318
|
|
|
318
319
|
|
|
320
|
+
def _clone_worker(parsed, target, repo_key, *, retry, shallow, branch, recursive, timeout):
|
|
321
|
+
"""Clone one target, retrying up to `retry` times.
|
|
322
|
+
|
|
323
|
+
`git_clone` stages each attempt privately and publishes by rename, so the
|
|
324
|
+
target is never touched by a failed attempt and nothing here cleans up.
|
|
325
|
+
"""
|
|
326
|
+
success, error = False, ""
|
|
327
|
+
for _attempt in range(1 + retry):
|
|
328
|
+
success, error = git_clone(
|
|
329
|
+
url=parsed.clone_url,
|
|
330
|
+
target=target,
|
|
331
|
+
shallow=shallow,
|
|
332
|
+
branch=branch,
|
|
333
|
+
recursive=recursive,
|
|
334
|
+
timeout=timeout,
|
|
335
|
+
)
|
|
336
|
+
if success or os.path.lexists(target): # a taken target refuses every retry too
|
|
337
|
+
break
|
|
338
|
+
return {"repo": repo_key, "success": success, "error": error}
|
|
339
|
+
|
|
340
|
+
|
|
319
341
|
def _clone_error_hint(error: str) -> str:
|
|
320
342
|
"""Return a user-friendly hint based on common clone error patterns."""
|
|
321
343
|
err = error.lower()
|
|
@@ -14,7 +14,7 @@ from rich.console import Console
|
|
|
14
14
|
from gitstow.cli.helpers import print_no_workspaces_hint, resolve_workspaces
|
|
15
15
|
from gitstow.core.config import load_config, save_config
|
|
16
16
|
from gitstow.core.paths import CONFIG_FILE, REPOS_FILE
|
|
17
|
-
from gitstow.core.repo import RepoStore
|
|
17
|
+
from gitstow.core.repo import RepoStore, inside_workspace
|
|
18
18
|
|
|
19
19
|
config_app = typer.Typer(
|
|
20
20
|
help="View and modify gitstow settings.",
|
|
@@ -211,6 +211,11 @@ def config_migrate_root(
|
|
|
211
211
|
for repo in movable:
|
|
212
212
|
src = repo.get_path(old_root)
|
|
213
213
|
dst = repo.get_path(new_root_path)
|
|
214
|
+
# Resolved: a symlinked owner folder can still point out of either root.
|
|
215
|
+
if not inside_workspace(src, old_root) or not inside_workspace(dst, new_root_path):
|
|
216
|
+
failed += 1
|
|
217
|
+
err_console.print(f" [red]✗[/red] {repo.key}: resolves outside the workspace; left where it is")
|
|
218
|
+
continue
|
|
214
219
|
dst.parent.mkdir(parents=True, exist_ok=True)
|
|
215
220
|
try:
|
|
216
221
|
if dst.exists():
|
|
@@ -93,6 +93,10 @@ def doctor(
|
|
|
93
93
|
orphaned_ws[label] = count
|
|
94
94
|
checks["orphaned_workspaces"] = orphaned_ws
|
|
95
95
|
|
|
96
|
+
# 5. Records set aside on load: a key that is not a safe folder path in its workspace
|
|
97
|
+
set_aside = store.rejected()
|
|
98
|
+
checks["set_aside_records"] = [{"workspace": ws, "key": key} for ws, key in set_aside]
|
|
99
|
+
|
|
96
100
|
if output_json:
|
|
97
101
|
json.dump(checks, sys.stdout, indent=2)
|
|
98
102
|
print()
|
|
@@ -149,7 +153,7 @@ def doctor(
|
|
|
149
153
|
|
|
150
154
|
if not workspaces:
|
|
151
155
|
console.print(" [dim]Nothing to check — no workspaces configured.[/dim]")
|
|
152
|
-
elif not total_orphaned and not total_missing:
|
|
156
|
+
elif not total_orphaned and not total_missing and not set_aside:
|
|
153
157
|
console.print(f"\n [green]✓ All repos in sync across {len(workspaces)} workspace(s)[/green]")
|
|
154
158
|
|
|
155
159
|
if orphaned_ws:
|
|
@@ -163,6 +167,19 @@ def doctor(
|
|
|
163
167
|
"with 'gitstow workspace add <path> --label <label>'.[/dim]"
|
|
164
168
|
)
|
|
165
169
|
|
|
170
|
+
if set_aside:
|
|
171
|
+
console.print(f"\n [yellow]⚠ {len(set_aside)} repos.yaml entr{'ies' if len(set_aside) != 1 else 'y'} "
|
|
172
|
+
"set aside (key is not a safe folder path inside its workspace; every command ignores "
|
|
173
|
+
f"{'them' if len(set_aside) != 1 else 'it'}):[/yellow]")
|
|
174
|
+
for label, key in set_aside:
|
|
175
|
+
console.print(f" {escape(f'[{label}]')} {escape(repr(key))}")
|
|
176
|
+
console.print(
|
|
177
|
+
f" [dim]gitstow keeps {'them' if len(set_aside) != 1 else 'it'} unchanged in {escape(str(repos_file))}. "
|
|
178
|
+
f"Delete {'each entry' if len(set_aside) != 1 else 'the entry'} there, then add the repo "
|
|
179
|
+
"again with 'gitstow add <url>' "
|
|
180
|
+
"(or 'gitstow workspace scan <label>' for a folder already on disk).[/dim]"
|
|
181
|
+
)
|
|
182
|
+
|
|
166
183
|
# 4. SSH connectivity hint
|
|
167
184
|
# Skipped entirely with nothing configured: an up-to-10s network probe to
|
|
168
185
|
# help repos that no workspace can reach is time spent for no answer.
|
|
@@ -14,6 +14,7 @@ from rich.console import Console
|
|
|
14
14
|
|
|
15
15
|
from gitstow.cli.helpers import iter_repos_with_workspace
|
|
16
16
|
from gitstow.core.config import load_config
|
|
17
|
+
from gitstow.core.git import _cwd_only_env
|
|
17
18
|
from gitstow.core.parallel import run_parallel_sync
|
|
18
19
|
from gitstow.core.repo import RepoStore
|
|
19
20
|
|
|
@@ -33,6 +34,7 @@ def _exec_in_repo(repo_path, command: list[str]) -> dict:
|
|
|
33
34
|
timeout=120,
|
|
34
35
|
encoding="utf-8",
|
|
35
36
|
errors="replace",
|
|
37
|
+
env=_cwd_only_env(repo_path), # a hook's GIT_DIR must not pick the repo
|
|
36
38
|
)
|
|
37
39
|
return {
|
|
38
40
|
"returncode": result.returncode,
|