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: opt-in git shim via pythongit[git] extra, plus MIT LICENSE
The `git` console-script used to be auto-installed alongside `pygit`, which
silently shadowed system git in any venv that had pythongit installed. This
turns the drop-in behavior into a deliberate per-environment choice.
Three install paths now exist; only the explicit ones add `git`:
pip install pythongit -> only `pygit`
pip install "pythongit[git]" -> `pygit` and `git` (via shim pkg)
pygit install-git-shim -> add `git` after-the-fact
The `[git]` extra pulls in a tiny companion distribution
`pythongit-git-shim` (this repo, `pythongit-git-shim/` sub-tree) whose only
role is to register the `git` console-script entry point. Uninstall the
shim package with pip to cleanly remove the `git` command, or use
`pygit uninstall-git-shim` for the post-install path.
Both paths warn when a different `git` would still resolve first on PATH,
and refuse to overwrite an unrelated file.
Adds:
- LICENSE (MIT)
- pythongit/cli.py: `install-git-shim` / `uninstall-git-shim` commands
- tests/unit_shim.py: 6 tests for the post-install path
- pythongit-git-shim/: companion package with its own pyproject + LICENSE
- pyproject.toml: `[project.optional-dependencies] git` entry,
`license = { file = "LICENSE" }`
- CI: builds and smoke-tests all three install paths
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments