@@ -2,7 +2,7 @@ use crate::OutputFormat;
22
33pub struct Options {
44 pub format : OutputFormat ,
5- pub resolve_content_merge : Option < gix:: merge:: blob :: builtin_driver :: text :: Conflict > ,
5+ pub file_favor : Option < gix:: merge:: tree :: FileFavor > ,
66 pub in_memory : bool ,
77}
88
@@ -12,8 +12,6 @@ pub(super) mod function {
1212 use anyhow:: { anyhow, bail, Context } ;
1313 use gix:: bstr:: BString ;
1414 use gix:: bstr:: ByteSlice ;
15- use gix:: merge:: blob:: builtin_driver:: binary;
16- use gix:: merge:: blob:: builtin_driver:: text:: Conflict ;
1715 use gix:: merge:: tree:: UnresolvedConflict ;
1816 use gix:: prelude:: Write ;
1917
@@ -29,7 +27,7 @@ pub(super) mod function {
2927 theirs : BString ,
3028 Options {
3129 format,
32- resolve_content_merge ,
30+ file_favor ,
3331 in_memory,
3432 } : Options ,
3533 ) -> anyhow:: Result < ( ) > {
@@ -44,17 +42,7 @@ pub(super) mod function {
4442 let ( ours_ref, ours_id) = refname_and_tree ( & repo, ours) ?;
4543 let ( theirs_ref, theirs_id) = refname_and_tree ( & repo, theirs) ?;
4644
47- let mut options = repo. tree_merge_options ( ) ?;
48- if let Some ( resolve) = resolve_content_merge {
49- options. blob_merge . text . conflict = resolve;
50- options. blob_merge . resolve_binary_with = match resolve {
51- Conflict :: Keep { .. } => None ,
52- Conflict :: ResolveWithOurs => Some ( binary:: ResolveWith :: Ours ) ,
53- Conflict :: ResolveWithTheirs => Some ( binary:: ResolveWith :: Theirs ) ,
54- Conflict :: ResolveWithUnion => None ,
55- } ;
56- }
57-
45+ let options = repo. tree_merge_options ( ) ?. with_file_favor ( file_favor) ;
5846 let base_id_str = base_id. to_string ( ) ;
5947 let ours_id_str = ours_id. to_string ( ) ;
6048 let theirs_id_str = theirs_id. to_string ( ) ;
0 commit comments