Tool for patching third-party dependencies without need to fork them
Find a file
2025-05-12 16:58:59 +04:00
.editorconfig fix: split subcommands into classes 2025-03-22 02:46:40 +04:00
.gitignore feat: add collecting nix derivation from source 2025-05-12 16:52:03 +04:00
.pre-commit-config.yaml fix: split subcommands into classes 2025-03-22 02:46:40 +04:00
collect-sources.nix fix: change license of nix 2025-05-12 16:58:59 +04:00
flake.lock feat: add collecting nix derivation from source 2025-05-12 16:52:03 +04:00
flake.nix feat: add collecting nix derivation from source 2025-05-12 16:52:03 +04:00
git-third-party fix: add logging, fix bugs 2025-03-22 03:19:05 +04:00
LICENSE Initial commit 2024-08-20 10:18:19 +04:00
LICENSE.lgpl fix: change license of nix 2025-05-12 16:58:59 +04:00
README.md fix: add logging, fix bugs 2025-03-22 03:19:05 +04:00
ruff.toml fix: split subcommands into classes 2025-03-22 02:46:40 +04:00

Git third party

Tool for patching third-party libraries without need to fork them

This is a small zero-dependency utility that is an alternative to git-submodules and git-subtree. It stores only delta (changes) inside your tree

This tool is not oriented for highly concurrent modification of third-party tools by multiple users

Usage

# adding 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 you can modify it as a regular repository, commit your changes

# save patches to push to your origin
git-third-party save third-party/RustPython
# ^ git-third-party save <relative path>

# update
git-third-party update third-party/RustPython
# ^ git-third-party update <relative path>

How it works?

It stores (at /.git-third-party/) a configuration that describes all third party repositories and patches. save command updates the patches, update command reapplies them

Directory .git-third-party must be controlled by git, while third-party repos should not

Best effort is done to keep patches deterministic and strip all metadata from them, which includes:

  • git version
  • commit hash (which depends on committer)
  • ...