- Python 87.1%
- Nix 12.9%
|
Some checks are pending
CI / ci (push) Waiting to run
Two steps on pushes to main and PRs: `nix flake check` (nixfmt + ruff-format + the sandboxed pytest suite) and a standalone pytest run for faster failure output. Both invoke `pytest --cov`; `.coveragerc` now sets `fail_under = 100`, so any uncovered branch of the tool fails the build. The flake `tests` derivation gains pytest-cov, and tests for the guard's base-bump, amended-commit and empty-commit branches close the gaps. |
||
|---|---|---|
| .github/workflows | ||
| docs/contributing | ||
| support/scripts | ||
| tests | ||
| .coveragerc | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| collect-sources.nix | ||
| flake.lock | ||
| flake.nix | ||
| git-third-party | ||
| LICENSE | ||
| LICENSE.lgpl | ||
| README.md | ||
| ruff.toml | ||
Git third party
Patch third-party libraries without forking them.
Background
git-third-party is a small zero-dependency utility that is an alternative to
git-submodules and
git-subtree.
It stores only the delta (your changes) inside your tree, not the full vendored
source.
It is not oriented for highly concurrent modification of third-party tools by multiple users.
Install
With Nix (flakes):
nix profile install github:kp2pml30/git-third-party
Or just drop the single script on your PATH — it needs only python3 and
git:
curl -o ~/.local/bin/git-third-party https://raw.githubusercontent.com/kp2pml30/git-third-party/main/git-third-party
chmod +x ~/.local/bin/git-third-party
Usage
# add a third-party repository
git-third-party add third-party/RustPython https://github.com/RustPython/RustPython.git a13b99642b0bc13ca89d01768a7ddbec18fe8219
# ^ git-third-party add <relative path> <repository url> <commit hash>
# now modify it as a regular repository, and commit your changes
# save patches to push to your origin
git-third-party save third-party/RustPython
# ^ git-third-party save <relative path>
# reapply patches (e.g. on a fresh checkout)
git-third-party update third-party/RustPython
# ^ git-third-party update <relative path>
Without installing, you can run it straight from the flake:
nix run github:kp2pml30/git-third-party -- add third-party/RustPython <url> <commit>
How it works
It stores a configuration under /.git-third-party/ that describes all
third-party repositories and their patches. save updates the patches, update
reapplies them.
The .git-third-party directory must be tracked by git, while the third-party
working trees themselves should not be.
Best effort is made to keep patches deterministic and to strip metadata from them, including:
- git version
- commit hash (which depends on the committer)
- …
Contributing
See docs/contributing/.
License
GPL-3.0 (C) 2024-2026 Kira Prokopenko