Skip to content

Commit 634a6a2

Browse files
committed
adapt to changes in gix-merge.
1 parent 3c13df1 commit 634a6a2

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

gitoxide-core/src/repository/merge/commit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::OutputFormat;
22
use anyhow::{anyhow, bail, Context};
33
use gix::bstr::BString;
44
use gix::bstr::ByteSlice;
5-
use gix::merge::tree::UnresolvedConflict;
5+
use gix::merge::tree::TreatAsUnresolved;
66
use gix::prelude::Write;
77

88
use super::tree::Options;
@@ -48,7 +48,7 @@ pub fn commit(
4848
.merge_commits(ours_id, theirs_id, labels, options.into())?
4949
.tree_merge;
5050
let has_conflicts = res.conflicts.is_empty();
51-
let has_unresolved_conflicts = res.has_unresolved_conflicts(UnresolvedConflict::Renames);
51+
let has_unresolved_conflicts = res.has_unresolved_conflicts(TreatAsUnresolved::Renames);
5252
{
5353
let _span = gix::trace::detail!("Writing merged tree");
5454
let mut written = 0;

gitoxide-core/src/repository/merge/tree.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub(super) mod function {
1212
use anyhow::{anyhow, bail, Context};
1313
use gix::bstr::BString;
1414
use gix::bstr::ByteSlice;
15-
use gix::merge::tree::UnresolvedConflict;
15+
use gix::merge::tree::TreatAsUnresolved;
1616
use gix::prelude::Write;
1717

1818
use super::Options;
@@ -62,7 +62,7 @@ pub(super) mod function {
6262
};
6363
let res = repo.merge_trees(base_id, ours_id, theirs_id, labels, options)?;
6464
let has_conflicts = res.conflicts.is_empty();
65-
let has_unresolved_conflicts = res.has_unresolved_conflicts(UnresolvedConflict::Renames);
65+
let has_unresolved_conflicts = res.has_unresolved_conflicts(TreatAsUnresolved::Renames);
6666
{
6767
let _span = gix::trace::detail!("Writing merged tree");
6868
let mut written = 0;

gix/src/merge.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub mod commit {
107107
///
108108
pub mod tree {
109109
use gix_merge::blob::builtin_driver;
110-
pub use gix_merge::tree::{Conflict, ContentMerge, Resolution, ResolutionFailure, UnresolvedConflict};
110+
pub use gix_merge::tree::{Conflict, ContentMerge, Resolution, ResolutionFailure, TreatAsUnresolved};
111111

112112
/// The outcome produced by [`Repository::merge_trees()`](crate::Repository::merge_trees()).
113113
#[derive(Clone)]
@@ -130,7 +130,7 @@ pub mod tree {
130130
impl Outcome<'_> {
131131
/// Return `true` if there is any conflict that would still need to be resolved as they would yield undesirable trees.
132132
/// This is based on `how` to determine what should be considered unresolved.
133-
pub fn has_unresolved_conflicts(&self, how: UnresolvedConflict) -> bool {
133+
pub fn has_unresolved_conflicts(&self, how: TreatAsUnresolved) -> bool {
134134
self.conflicts.iter().any(|c| c.is_unresolved(how))
135135
}
136136
}
@@ -206,7 +206,7 @@ pub mod tree {
206206
/// If `Some(what-is-unresolved)`, the first unresolved conflict will cause the entire merge to stop.
207207
/// This is useful to see if there is any conflict, without performing the whole operation, something
208208
/// that can be very relevant during merges that would cause a lot of blob-diffs.
209-
pub fn with_fail_on_conflict(mut self, fail_on_conflict: Option<UnresolvedConflict>) -> Self {
209+
pub fn with_fail_on_conflict(mut self, fail_on_conflict: Option<TreatAsUnresolved>) -> Self {
210210
self.inner.fail_on_conflict = fail_on_conflict;
211211
self
212212
}

0 commit comments

Comments
 (0)