Skip to content

Commit c4ffde0

Browse files
committed
feat: add mailmap feature
1 parent 799a515 commit c4ffde0

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

gix/Cargo.toml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ required-features = ["blocking-network-client"]
2020

2121
[features]
2222

23-
default = ["max-performance-safe", "comfort", "extras"]
23+
default = ["max-performance-safe", "comfort", "basic", "extras"]
2424

2525
#! There are various categories of features which help to optimize performance and build times. `gix` comes with 'batteries included' and everything is
2626
#! enabled as long as it doesn't sacrifice compatibility. Most users will be fine with that but will pay with higher compile times than necessary as they
@@ -47,8 +47,11 @@ default = ["max-performance-safe", "comfort", "extras"]
4747
#! A bundle is a set of related feature toggles which can be activated with a single name that acts as a group.
4848
#! Bundles are for convenience only and bear no further meaning beyond the cargo manifest file.
4949

50+
## More fundamental components that most will be able to make good use of.
51+
basic = ["blob-diff", "revision"]
52+
5053
## Various additional features and capabilities that are not necessarily part of what most users would need.
51-
extras = ["worktree-stream", "worktree-archive", "blob-diff", "revision", "revparse-regex"]
54+
extras = ["worktree-stream", "worktree-archive", "revparse-regex", "mailmap"]
5255

5356
## Various progress-related features that improve the look of progress message units.
5457
comfort = ["gix-features/progress-unit-bytes", "gix-features/progress-unit-human-numbers"]
@@ -58,6 +61,9 @@ comfort = ["gix-features/progress-unit-bytes", "gix-features/progress-unit-human
5861
#! A component is a distinct feature which may be comprised of one or more methods around a particular topic.
5962
#! Providers of libraries should only activate
6063

64+
## Add support for mailmaps, as way of determining the final name of commmiters and authors.
65+
mailmap = ["dep:gix-mailmap"]
66+
6167
## Make revspec parsing possible, as well describing revision.
6268
revision = ["gix-revision/describe"]
6369

@@ -147,7 +153,7 @@ serde = [ "dep:serde",
147153
"gix-ref/serde",
148154
"gix-odb/serde",
149155
"gix-index/serde",
150-
"gix-mailmap/serde",
156+
"gix-mailmap?/serde",
151157
"gix-url/serde",
152158
"gix-attributes/serde",
153159
"gix-ignore/serde",
@@ -192,7 +198,7 @@ gix-path = { version = "^0.9.0", path = "../gix-path" }
192198
gix-url = { version = "^0.22.0", path = "../gix-url" }
193199
gix-traverse = { version = "^0.31.0", path = "../gix-traverse" }
194200
gix-diff = { version = "^0.34.0", path = "../gix-diff", default-features = false }
195-
gix-mailmap = { version = "^0.17.0", path = "../gix-mailmap" }
201+
gix-mailmap = { version = "^0.17.0", path = "../gix-mailmap", optional = true }
196202
gix-features = { version = "^0.33.0", path = "../gix-features", features = ["progress", "once_cell"] }
197203
gix-trace = { version = "^0.1.3", path = "../gix-trace" }
198204

gix/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ pub mod open;
257257
pub mod config;
258258

259259
///
260+
#[cfg(feature = "mailmap")]
260261
pub mod mailmap;
261262

262263
///

gix/src/repository/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ mod index;
4747
pub(crate) mod init;
4848
mod kind;
4949
mod location;
50+
#[cfg(feature = "mailmap")]
5051
mod mailmap;
5152
mod object;
5253
mod pathspec;

justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ check:
117117
cargo check -p gix --no-default-features --features blob-diff
118118
cargo check -p gix --no-default-features --features revision
119119
cargo check -p gix --no-default-features --features revparse-regex
120+
cargo check -p gix --no-default-features --features mailmap
120121
cargo check -p gix --no-default-features
121122
cargo check -p gix-odb --features serde
122123
cargo check --no-default-features --features max-control

0 commit comments

Comments
 (0)