Skip to content

Commit

Permalink
Fix incorrect docs (#298)
Browse files Browse the repository at this point in the history
* Fix incorrect docs

* rustfmt
  • Loading branch information
CraZySacX authored Jan 17, 2024
1 parent 4d348d8 commit 8f6f820
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ vergen = { version = "8.2.10", features = ["git","gitcl","gitoxide"] }
and prior to **8.3.0** `vergen` will not compile with both `gitcl` and `gitoxide` as features.

As a workaround, you can use `cargo tree -f "{p} {f}" | grep vergen` to determine the feature list cargo has set for `vergen`. If
a `git` backend has already been determined you will be able to use that without declaring those features in your dependency list.
a `git` backend has already been determined you will be able to use that without declaring those features in your dependency list. This is not perfect as this leaves you at the mercy of your dependency and the git feature they selected, but it's a workaround until version 9 comes out.

#### fancy-lib `Cargo.toml`
```toml
Expand All @@ -78,7 +78,7 @@ vergen = "8.2.10"
vergen = { version = "8.2.10", features = ["git","gitcl"] }
```
## `Cargo` feature unification for `vergen` versions 8.3.0 and beyond
`vergen` will accept `gitcl`,`git2`, and `gitoxide` as features. If more than one of them is included, `vergen` will select `gitcl` before `git2` and `git2` before `gitoxide`. If none are selected (for example, if you enable `git`, but don't select a backend feature), `gitoxide` will be selected.
`vergen` will accept `gitcl`,`git2`, and `gitoxide` as features. If more than one of them is included, `vergen` will select `gitcl` before `git2` and `git2` before `gitoxide`.

## Notes about the optional `git2` dependency
`git2` picked up some [security related features](https://github.blog/2022-04-12-git-security-vulnerability-announced/). In docker environments especially, this requires a `safe.directory` configuration. There are a couple methods for achieving this.
Expand Down
5 changes: 3 additions & 2 deletions vergen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@
//! and prior to **8.3.0** `vergen` will not compile with both `gitcl` and `gitoxide` as features.
//!
//! As a workaround, you can use `cargo tree -f "{p} {f}" | grep vergen` to determine the feature list cargo has set for `vergen`. If
//! a `git` backend has already been determined you will be able to use that without declaring those features in your dependency list.
//! a `git` backend has already been determined you will be able to use that without declaring those features in your dependency list. This is not perfect
//! as this leaves you at the mercy of your dependency and the git feature they selected, but it's a workaround until version 9 comes out.
//!
//! #### fancy-lib `Cargo.toml`
//! ```toml
Expand All @@ -206,7 +207,7 @@
//! vergen = { version = "8.2.10", features = ["git","gitcl"] }
//! ```
//! ### `Cargo` feature unification for `vergen` versions 8.3.0 and beyond
//! `vergen` will accept `gitcl`,`git2`, and `gitoxide` as features. If more than one of them is included, `vergen` will select `gitcl` before `git2` and `git2` before `gitoxide`. If none are selected (for example, if you enable `git`, but don't select a backend feature), `gitoxide` will be selected.
//! `vergen` will accept `gitcl`,`git2`, and `gitoxide` as features. If more than one of them is included, `vergen` will select `gitcl` before `git2` and `git2` before `gitoxide`.
//!
//! ## Environment Variables
//! `vergen` currently recognizes the following environment variables
Expand Down

0 comments on commit 8f6f820

Please sign in to comment.