@@ -29,7 +29,7 @@ pub enum Error {
29
29
/// The outcome produced by [`tree()`](crate::tree()).
30
30
#[ derive( Clone ) ]
31
31
pub struct Outcome < ' a > {
32
- /// The ready-made (but unwritten) which is the *base* tree, including all non-conflicting changes, and the changes that had
32
+ /// The ready-made (but unwritten) *base* tree, including all non-conflicting changes, and the changes that had
33
33
/// conflicts which could be resolved automatically.
34
34
///
35
35
/// This means, if all of their changes were conflicting, this will be equivalent to the *base* tree.
@@ -70,7 +70,7 @@ impl Outcome<'_> {
70
70
#[ derive( Debug , Clone ) ]
71
71
pub struct Conflict {
72
72
/// A record on how the conflict resolution succeeded with `Ok(_)` or failed with `Err(_)`.
73
- /// In case of `Err(_)`, no write
73
+ /// Note that in case of `Err(_)`, edits may still have been made to the tree to aid resolution.
74
74
/// On failure, one can examine `ours` and `theirs` to potentially find a custom solution.
75
75
/// Note that the descriptions of resolutions or resolution failures may be swapped compared
76
76
/// to the actual changes. This is due to changes like `modification|deletion` being treated the
@@ -81,13 +81,17 @@ pub struct Conflict {
81
81
pub ours : Change ,
82
82
/// The change representing *their* side.
83
83
pub theirs : Change ,
84
+ /// Determine how to interpret the `ours` and `theirs` fields. This is used to implement [`Self::changes_in_resolution()`]
85
+ /// and [`Self::into_parts_by_resolution()`].
84
86
map : ConflictMapping ,
85
87
}
86
88
87
- /// A utility to help define which side is what.
89
+ /// A utility to help define which side is what in the [`Conflict`] type .
88
90
#[ derive( Debug , Clone , Copy ) ]
89
91
enum ConflictMapping {
92
+ /// The sides are as described in the field documentation, i.e. `ours` is `ours`.
90
93
Original ,
94
+ /// The sides are the opposite of the field documentation. i.e. `ours` is `theirs` and `theirs` is `ours`.
91
95
Swapped ,
92
96
}
93
97
@@ -236,11 +240,8 @@ pub struct Options {
236
240
/// The context to use when invoking merge-drivers.
237
241
pub blob_merge_command_ctx : gix_command:: Context ,
238
242
/// If `Some(what-is-unresolved)`, the first unresolved conflict will cause the entire merge to stop.
239
- /// This is useful to see if there is any conflict, without performing the whole operation.
240
- // TODO: Maybe remove this if the cost of figuring out conflicts is so low - after all, the data structures
241
- // and initial diff is the expensive thing right now, which are always done upfront.
242
- // However, this could change once we know do everything during the traversal, which probably doesn't work
243
- // without caching stuff and is too complicated to actually do.
243
+ /// This is useful to see if there is any conflict, without performing the whole operation, something
244
+ /// that can be very relevant during merges that would cause a lot of blob-diffs.
244
245
pub fail_on_conflict : Option < UnresolvedConflict > ,
245
246
/// This value also affects the size of merge-conflict markers, to allow differentiating
246
247
/// merge conflicts on each level, for any value greater than 0, with values `N` causing `N*2`
0 commit comments