@@ -108,7 +108,8 @@ pub mod commit {
108
108
pub mod tree {
109
109
use gix_merge:: blob:: builtin_driver;
110
110
pub use gix_merge:: tree:: {
111
- treat_as_unresolved, Conflict , ContentMerge , Resolution , ResolutionFailure , TreatAsUnresolved ,
111
+ apply_index_entries, treat_as_unresolved, Conflict , ContentMerge , Resolution , ResolutionFailure ,
112
+ TreatAsUnresolved ,
112
113
} ;
113
114
114
115
/// The outcome produced by [`Repository::merge_trees()`](crate::Repository::merge_trees()).
@@ -138,22 +139,19 @@ pub mod tree {
138
139
139
140
/// Returns `true` if `index` changed as we applied conflicting stages to it, using `how` to determine if a
140
141
/// conflict should be considered unresolved.
141
- /// It's important that `index` is at the state of [`Self::tree`].
142
- ///
143
- /// Note that in practice, whenever there is a single [conflict](Conflict), this function will return `true`.
144
142
///
145
- /// ### Important
143
+ /// `removal_mode` decides how unconflicted entries should be removed if they are superseded by
144
+ /// their conflicted counterparts.
146
145
///
147
- /// Also, the unconflicted stage of such entries will be removed merely by setting a flag, so the
148
- /// in-memory entry is still present.
149
- /// One can prune `index` [in-memory](gix_index::State::remove_entries()) or write it to disk, which will
150
- /// cause entries marked for removal not to be persisted.
146
+ /// It's important that `index` is at the state of [`Self::tree`].
147
+ /// Note that in practice, whenever there is a single [conflict](Conflict), this function will return `true`.
151
148
pub fn index_changed_after_applying_conflicts (
152
149
& self ,
153
150
index : & mut gix_index:: State ,
154
151
how : TreatAsUnresolved ,
152
+ removal_mode : apply_index_entries:: RemovalMode ,
155
153
) -> bool {
156
- gix_merge :: tree :: apply_index_entries ( & self . conflicts , how, index)
154
+ apply_index_entries ( & self . conflicts , how, index, removal_mode )
157
155
}
158
156
}
159
157
0 commit comments