|0.7.5||Aug 2, 2018|
|0.7.4||Jul 30, 2018|
|0.7.1||Mar 22, 2018|
|0.6.10||Dec 20, 2017|
|0.0.1||Nov 14, 2014|
#1 in #git
53,619 downloads per month
Used in 153 crates (110 directly)
libgit2 bindings for Rust
[dependencies] git2 = "0.7"
Currently this library requires libgit2 0.25.1. 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.
First, you'll need to install CMake. Afterwards, just run:
$ git clone https://github.com/alexcrichton/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.
Currently libssh2 requires linking against OpenSSL, and to compile libssh2 it also needs to find the OpenSSL headers. On OSX 10.10+ the OpenSSL headers have been removed, but if you're using Homebrew you can install them via:
brew install openssl
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.