23 releases (13 breaking)
|0.14.1||Aug 19, 2020|
|0.14.0||Mar 13, 2020|
|0.13.0||Feb 26, 2020|
|0.12.0||Dec 12, 2019|
|0.2.2||Mar 25, 2015|
44,748 downloads per month
Used in 85 crates (4 directly)
libgit2 bindings for Rust
[dependencies] git2 = "0.13"
git2-rs works with stable Rust, and typically works with the most recent prior stable release as well. Check the MSRV job of the CI script to see the oldest version of Rust known to pass tests.
Currently this library requires libgit2 1.1.0. The source for libgit2 is included in the libgit2-sys crate so there's no need to pre-install the libgit2 library, the libgit2-sys crate will figure that and/or build that for you.
$ git clone https://github.com/rust-lang/git2-rs $ cd git2-rs $ cargo build
Running tests and handling all of the associated edge cases on every commit
proves tedious very quickly. To automate tests and handle proper stashing and
unstashing of unstaged changes and thus avoid nasty surprises, use the
pre-commit hook found here and place it into the
.git/hooks/ with the name
pre-commit. You may need to add execution
To skip tests on a simple commit or doc-fixes, use
git commit --no-verify.
ssh feature is enabled (and it is by default) then this library depends
on libssh2 which depends on OpenSSL. To get OpenSSL working follow the
openssl crate's instructions.
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in git2-rs by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.