Expand description
§📦 git-vendor
An in-source vendoring alternative to Git submodules and subtrees.
[!CAUTION] This project is in active development. There are surely bugs and misbehaviors that have not yet been discovered. Please file a new issue for any misbehaviors you find!
§Overview
Git has long supported vendoring content from external repositories via submodules, and more recently subtrees.
These two options have different tradeoffs.
Submodules are easy to update for maintainers with the update --remote command, but require contributors to take extra steps to retrieve all repository content.
Subtrees are easy for contributors (the files are right there in the worktree) but require extra steps for maintainers: maintainers must specify the remote URL and reference each time.
The git-vendor project aims to bring the best of both worlds.
Vendored content is stored directly in the worktree, so the remote source of content is opaque to contributors.
Still, the source information is versioned controlled and readily available for maintainers in a new .gitvendors file.
§Installation
§CLI
The git-vendor plumbing command can be installed with cargo install.
cargo install --locked git-vendorIf ~/.cargo/bin is on your PATH, you can invoke the command with git.
git vendor -h§Library
The git-vendor library can be added to your Rust project via cargo add.
cargo add git-vendorModules§
Structs§
- Vendor
Source - All metadata required to retrieve necessary objects from a vendor.
Traits§
- Vendor
- A trait which provides methods for vendoring content across repository boundaries.