pub struct Options {
pub rewrites: Option<Rewrites>,
pub blob_merge: Options,
pub blob_merge_command_ctx: Context,
pub fail_on_conflict: Option<TreatAsUnresolved>,
pub marker_size_multiplier: u8,
pub symlink_conflicts: Option<ResolveWith>,
pub tree_conflicts: Option<ResolveWith>,
}
Expand description
A way to configure tree()
.
Fields§
§rewrites: Option<Rewrites>
If not None
, rename tracking will be performed when determining the changes of each side of the merge.
Note that empty blobs should not be tracked for best results.
blob_merge: Options
Decide how blob-merges should be done. This relates to if conflicts can be resolved or not.
blob_merge_command_ctx: Context
The context to use when invoking merge-drivers.
fail_on_conflict: Option<TreatAsUnresolved>
If Some(what-is-unresolved)
, the first unresolved conflict will cause the entire merge to stop.
This is useful to see if there is any conflict, without performing the whole operation, something
that can be very relevant during merges that would cause a lot of blob-diffs.
marker_size_multiplier: u8
This value also affects the size of merge-conflict markers, to allow differentiating
merge conflicts on each level, for any value greater than 0, with values N
causing N*2
markers to be added to the configured value.
This is used automatically when merging merge-bases recursively.
symlink_conflicts: Option<ResolveWith>
If None
, when symlinks clash ours will be chosen and a conflict will occur.
Otherwise, the same logic applies as for the merge of binary resources.
tree_conflicts: Option<ResolveWith>
If None
, tree irreconcilable tree conflicts will result in resolution failures.
Otherwise, one can choose a side. Note that it’s still possible to determine that auto-resolution happened
despite this choice, which allows carry forward the conflicting information, possibly for later resolution.
If Some(…)
, irreconcilable conflicts are reconciled by making a choice.
Note that Conflict::entries()
will still be set, to not degenerate information, even though they then represent
the entries what would fit the index if no forced resolution was performed.
It’s up to the caller to handle that information mindfully.