Skip to content

Commit 2547935

Browse files
committed
fix!: rename blob-merge feature to tree-merge.
By now, `blob-merge` is the lowest-level of features which is required for both tree-merges and commit based merges. Hence it's better to just call it `merge`.
1 parent 1d2262f commit 2547935

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

gix/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ extras = [
6969

7070
## A collection of features that need a larger MSRV, and thus are disabled by default.
7171
## * `blob-merge` should be in extras, but needs `tree-editor` for convenience.
72-
need-more-recent-msrv = ["blob-merge", "tree-editor"]
72+
need-more-recent-msrv = ["merge", "tree-editor"]
7373

7474
## Various progress-related features that improve the look of progress message units.
7575
comfort = [
@@ -139,7 +139,7 @@ revparse-regex = ["regex", "revision"]
139139
blob-diff = ["gix-diff/blob", "attributes"]
140140

141141
## Add functions to specifically merge files, using the standard three-way merge that git offers.
142-
blob-merge = ["tree-editor", "blob-diff", "dep:gix-merge", "attributes"]
142+
merge = ["tree-editor", "blob-diff", "dep:gix-merge", "attributes"]
143143

144144
## Make it possible to turn a tree into a stream of bytes, which can be decoded to entries and turned into various other formats.
145145
worktree-stream = ["gix-worktree-stream", "attributes"]

gix/src/config/cache/access.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl Cache {
100100
Ok(out)
101101
}
102102

103-
#[cfg(feature = "blob-merge")]
103+
#[cfg(feature = "merge")]
104104
pub(crate) fn merge_drivers(&self) -> Result<Vec<gix_merge::blob::Driver>, config::merge::drivers::Error> {
105105
let mut out = Vec::<gix_merge::blob::Driver>::new();
106106
for section in self
@@ -136,7 +136,7 @@ impl Cache {
136136
Ok(out)
137137
}
138138

139-
#[cfg(feature = "blob-merge")]
139+
#[cfg(feature = "merge")]
140140
pub(crate) fn merge_pipeline_options(
141141
&self,
142142
) -> Result<gix_merge::blob::pipeline::Options, config::merge::pipeline_options::Error> {

gix/src/config/tree/sections/merge.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ impl Merge {
1515
"The limit is actually squared, so 1000 stands for up to 1 million diffs if fuzzy rename tracking is enabled",
1616
);
1717
/// The `merge.renames` key.
18-
#[cfg(feature = "blob-merge")]
18+
#[cfg(feature = "merge")]
1919
pub const RENAMES: super::diff::Renames = super::diff::Renames::new_renames("renames", &config::Tree::MERGE);
2020
/// The `merge.renormalize` key
2121
pub const RENORMALIZE: keys::Boolean = keys::Boolean::new_boolean("renormalize", &Tree::MERGE);
@@ -31,7 +31,7 @@ impl Merge {
3131
pub const DRIVER_RECURSIVE: keys::String = keys::String::new_string("recursive", &config::Tree::MERGE)
3232
.with_subsection_requirement(Some(SubSectionRequirement::Parameter("driver")));
3333
/// The `merge.conflictStyle` key.
34-
#[cfg(feature = "blob-merge")]
34+
#[cfg(feature = "merge")]
3535
pub const CONFLICT_STYLE: ConflictStyle =
3636
ConflictStyle::new_with_validate("conflictStyle", &config::Tree::MERGE, validate::ConflictStyle);
3737
}
@@ -44,24 +44,24 @@ impl Section for Merge {
4444
fn keys(&self) -> &[&dyn Key] {
4545
&[
4646
&Self::RENAME_LIMIT,
47-
#[cfg(feature = "blob-merge")]
47+
#[cfg(feature = "merge")]
4848
&Self::RENAMES,
4949
&Self::RENORMALIZE,
5050
&Self::DEFAULT,
5151
&Self::DRIVER_NAME,
5252
&Self::DRIVER_COMMAND,
5353
&Self::DRIVER_RECURSIVE,
54-
#[cfg(feature = "blob-merge")]
54+
#[cfg(feature = "merge")]
5555
&Self::CONFLICT_STYLE,
5656
]
5757
}
5858
}
5959

6060
/// The `merge.conflictStyle` key.
61-
#[cfg(feature = "blob-merge")]
61+
#[cfg(feature = "merge")]
6262
pub type ConflictStyle = keys::Any<validate::ConflictStyle>;
6363

64-
#[cfg(feature = "blob-merge")]
64+
#[cfg(feature = "merge")]
6565
mod conflict_style {
6666
use crate::{bstr::BStr, config, config::tree::sections::merge::ConflictStyle};
6767
use gix_merge::blob::builtin_driver::text;
@@ -87,7 +87,7 @@ mod conflict_style {
8787
}
8888
}
8989

90-
#[cfg(feature = "blob-merge")]
90+
#[cfg(feature = "merge")]
9191
mod validate {
9292
use crate::{
9393
bstr::BStr,

gix/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ pub mod push;
203203
pub mod diff;
204204

205205
///
206+
#[cfg(feature = "merge")]
206207
pub mod merge;
207208

208209
/// See [`ThreadSafeRepository::discover()`], but returns a [`Repository`] instead.

gix/src/merge.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#[cfg(feature = "blob-merge")]
21
pub use gix_merge as plumbing;
32

43
pub use gix_merge::blob;

gix/src/repository/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ mod location;
4343
#[cfg(feature = "mailmap")]
4444
mod mailmap;
4545
///
46-
#[cfg(feature = "blob-merge")]
46+
#[cfg(feature = "merge")]
4747
mod merge;
4848
mod object;
4949
#[cfg(feature = "attributes")]
@@ -75,7 +75,7 @@ pub mod diff_tree_to_tree {
7575
}
7676

7777
///
78-
#[cfg(feature = "blob-merge")]
78+
#[cfg(feature = "merge")]
7979
pub mod blob_merge_options {
8080
/// The error returned by [Repository::blob_merge_options()](crate::Repository::blob_merge_options()).
8181
#[derive(Debug, thiserror::Error)]
@@ -89,7 +89,7 @@ pub mod blob_merge_options {
8989
}
9090

9191
///
92-
#[cfg(feature = "blob-merge")]
92+
#[cfg(feature = "merge")]
9393
pub mod merge_resource_cache {
9494
/// The error returned by [Repository::merge_resource_cache()](crate::Repository::merge_resource_cache()).
9595
#[derive(Debug, thiserror::Error)]
@@ -113,7 +113,7 @@ pub mod merge_resource_cache {
113113
}
114114

115115
///
116-
#[cfg(feature = "blob-merge")]
116+
#[cfg(feature = "merge")]
117117
pub mod merge_trees {
118118
/// The error returned by [Repository::merge_trees()](crate::Repository::merge_trees()).
119119
#[derive(Debug, thiserror::Error)]
@@ -131,7 +131,7 @@ pub mod merge_trees {
131131
}
132132

133133
///
134-
#[cfg(feature = "blob-merge")]
134+
#[cfg(feature = "merge")]
135135
pub mod tree_merge_options {
136136
/// The error returned by [Repository::tree_merge_options()](crate::Repository::tree_merge_options()).
137137
#[derive(Debug, thiserror::Error)]

gix/tests/gix/config/tree.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ mod diff {
365365
}
366366
}
367367

368-
#[cfg(feature = "blob-merge")]
368+
#[cfg(feature = "merge")]
369369
mod merge {
370370
use crate::config::tree::bcow;
371371
use gix::config::tree::{Key, Merge};

0 commit comments

Comments
 (0)