Skip to content

Commit d58c7ce

Browse files
authored
Merge pull request #1182 from joshtriplett/update-docs-for-features
Update documentation and CI for features
2 parents ae91c48 + dfd9b91 commit d58c7ce

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ jobs:
3333
- name: Install Rust (rustup)
3434
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
3535
shell: bash
36-
- run: cargo test --no-default-features --locked
37-
- run: cargo test
36+
- run: cargo test --locked
37+
- run: cargo test --features https,ssh
3838
- run: cargo run -p systest
3939
- run: cargo test -p git2-curl
4040

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,9 @@ zlib-ng-compat = ["libgit2-sys/zlib-ng-compat"]
4545

4646
[workspace]
4747
members = ["systest", "git2-curl"]
48+
49+
[package.metadata.docs.rs]
50+
features = ["https", "ssh"]
51+
52+
[[examples]]
53+
required-features = ["https", "ssh"]

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,20 @@
44

55
libgit2 bindings for Rust.
66

7-
```toml
8-
[dependencies]
9-
git2 = "0.21"
7+
```
8+
cargo add git2
9+
```
10+
11+
## Features
12+
13+
By default, git2 includes support for working with local repositories, but does
14+
not include network support (e.g. cloning remote repositories). If you want to
15+
use features that require network support, you may need the `"https"` and/or
16+
`"ssh"` features. If you support user-provided repository URLs, you probably
17+
want to enable both.
18+
19+
```
20+
cargo add git2 --features https,ssh
1021
```
1122

1223
## Rust version requirements

0 commit comments

Comments
 (0)