Skip to content

Commit 6ee54dc

Browse files
committed
support for merge related options in config tree
1 parent 9deaa45 commit 6ee54dc

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ mod renames {
165165
}
166166
}
167167

168-
mod validate {
168+
pub(super) mod validate {
169169
use crate::{
170170
bstr::BStr,
171171
config::tree::{keys, Diff},

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

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
use crate::config;
22
use crate::config::tree::SubSectionRequirement;
33
use crate::config::{
4-
tree::{keys, Key, Merge, Section},
4+
tree::{diff, keys, Key, Merge, Section},
55
Tree,
66
};
77

88
impl Merge {
9+
/// The `merge.renameLimit` key.
10+
pub const RENAME_LIMIT: keys::UnsignedInteger = keys::UnsignedInteger::new_unsigned_integer(
11+
"renameLimit",
12+
&config::Tree::MERGE,
13+
)
14+
.with_note(
15+
"The limit is actually squared, so 1000 stands for up to 1 million diffs if fuzzy rename tracking is enabled",
16+
);
17+
/// The `merge.renames` key.
18+
pub const RENAMES: diff::Renames = diff::Renames::new_renames("renames", &config::Tree::MERGE);
919
/// The `merge.renormalize` key
1020
pub const RENORMALIZE: keys::Boolean = keys::Boolean::new_boolean("renormalize", &Tree::MERGE);
1121
/// The `merge.default` key
@@ -32,11 +42,15 @@ impl Section for Merge {
3242

3343
fn keys(&self) -> &[&dyn Key] {
3444
&[
45+
&Self::RENAME_LIMIT,
46+
&Self::RENAMES,
3547
&Self::RENORMALIZE,
3648
&Self::DEFAULT,
3749
&Self::DRIVER_NAME,
3850
&Self::DRIVER_COMMAND,
3951
&Self::DRIVER_RECURSIVE,
52+
#[cfg(feature = "blob-merge")]
53+
&Self::CONFLICT_STYLE,
4054
]
4155
}
4256
}

src/plumbing/progress.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl Display for Usage {
2929
}
3030
InUse(deviation) => {
3131
if !deviation.is_empty() {
32-
write!(f, "❗️❗️❗️{deviation}")?;
32+
write!(f, "❗️{deviation}")?;
3333
}
3434
}
3535
}
@@ -411,12 +411,12 @@ static GIT_CONFIG: &[Record] = &[
411411
usage: Planned("Required for big monorepos, and typically used in conjunction with sparse indices")
412412
},
413413
Record {
414-
config: "merge.renameLimit",
415-
usage: Planned("The same as 'diff.renameLimit'")
414+
config: "merge.directoryRenames",
415+
usage: NotPlanned("On demand")
416416
},
417417
Record {
418-
config: "merge.renames",
419-
usage: Planned("The same as 'diff.renames'")
418+
config: "merge.verbosity",
419+
usage: NotApplicable("Only useful for Git CLI")
420420
},
421421
Record {
422422
config: "status.renameLimit",
@@ -431,7 +431,7 @@ static GIT_CONFIG: &[Record] = &[
431431
usage: Planned("Currently we are likely to expose passwords in errors or in other places, and it's better to by default not do that")
432432
},
433433
Record {
434-
config: "diff.*.cachetextconv",
434+
config: "diff.*.cacheTextConv",
435435
usage: NotPlanned("It seems to slow to do that, and persisting results to save a relatively cheap computation doesn't seem right")
436436
},
437437
];

0 commit comments

Comments
 (0)