Skip to content

Commit 397024b

Browse files
committed
feat: add describe feature
That way users can more precisely decide what they want to use. Note that spec-parsing is so foundational that it's always included. Those who don't need it nor need describe don't need the crate in the fist place.
1 parent 147528f commit 397024b

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

gix-revision/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ rust-version = "1.65"
1313
doctest = false
1414

1515
[features]
16+
default = ["describe"]
17+
18+
## `git describe` functionality
19+
describe = []
20+
1621
## Data structures implement `serde::Serialize` and `serde::Deserialize`.
1722
serde = [ "dep:serde", "gix-hash/serde", "gix-object/serde" ]
1823

gix-revision/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
#![deny(missing_docs, rust_2018_idioms, unsafe_code)]
1010

1111
///
12+
#[cfg(feature = "describe")]
1213
pub mod describe;
14+
#[cfg(feature = "describe")]
1315
pub use describe::function::describe;
1416

1517
///

gix-revision/tests/revision.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#[cfg(feature = "describe")]
12
mod describe;
23
mod spec;
34
pub type Result<T = ()> = std::result::Result<T, Box<dyn std::error::Error + 'static>>;

justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ check:
7777
cargo check -p gix-credentials --features serde
7878
cargo check -p gix-sec --features serde
7979
cargo check -p gix-revision --features serde
80+
cargo check -p gix-revision --no-default-features --features describe
8081
cargo check -p gix-mailmap --features serde
8182
cargo check -p gix-url --all-features
8283
cargo check -p gix-features --all-features

0 commit comments

Comments
 (0)