• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/workflows/H03-May-2022-4744

examples/H03-May-2022-2,4161,845

src/H03-May-2022-24,19317,354

tests/H03-May-2022-4833

.cargo-checksum.jsonH A D03-May-202289 11

.cargo_vcs_info.jsonH A D01-Jan-197074 65

.gitignoreH A D29-Nov-197330 43

.gitmodulesH A D29-Nov-1973104 43

Cargo.lockH A D01-Jan-197013.7 KiB552490

Cargo.tomlH A D01-Jan-19701.9 KiB6655

Cargo.toml.orig-cargoH A D29-Nov-19731.3 KiB4741

LICENSE-APACHEH A D29-Nov-197310.6 KiB202169

LICENSE-MITH A D29-Nov-19731 KiB2622

README.mdH A D29-Nov-19731.9 KiB6744

README.md

1# git2-rs
2
3[Documentation](https://docs.rs/git2)
4
5libgit2 bindings for Rust
6
7```toml
8[dependencies]
9git2 = "0.13"
10```
11
12## Rust version requirements
13
14git2-rs works with stable Rust, and typically works with the most recent prior
15stable release as well.
16
17## Version of libgit2
18
19Currently this library requires libgit2 1.1.0. The source for libgit2 is
20included in the libgit2-sys crate so there's no need to pre-install the libgit2
21library, the libgit2-sys crate will figure that and/or build that for you.
22
23## Building git2-rs
24
25```sh
26$ git clone https://github.com/rust-lang/git2-rs
27$ cd git2-rs
28$ cargo build
29```
30
31### Automating Testing
32
33Running tests and handling all of the associated edge cases on every commit
34proves tedious very quickly.  To automate tests and handle proper stashing and
35unstashing of unstaged changes and thus avoid nasty surprises, use the
36pre-commit hook found [here][pre-commit-hook] and place it into the
37`.git/hooks/` with the name `pre-commit`.  You may need to add execution
38permissions with `chmod +x`.
39
40
41To skip tests on a simple commit or doc-fixes, use `git commit --no-verify`.
42
43## Building on OSX 10.10+
44
45If the `ssh` feature is enabled (and it is by default) then this library depends
46on libssh2 which depends on OpenSSL. To get OpenSSL working follow the
47[`openssl` crate's instructions](https://github.com/sfackler/rust-openssl#macos).
48
49# License
50
51This project is licensed under either of
52
53 * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
54   http://www.apache.org/licenses/LICENSE-2.0)
55 * MIT license ([LICENSE-MIT](LICENSE-MIT) or
56   http://opensource.org/licenses/MIT)
57
58at your option.
59
60### Contribution
61
62Unless you explicitly state otherwise, any contribution intentionally submitted
63for inclusion in git2-rs by you, as defined in the Apache-2.0 license, shall be
64dual licensed as above, without any additional terms or conditions.
65
66[pre-commit-hook]: https://gist.github.com/glfmn/0c5e9e2b41b48007ed3497d11e3dbbfa
67