@@ -2,7 +2,7 @@ use crate::OutputFormat;
2
2
3
3
pub struct Options {
4
4
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 > ,
6
6
pub in_memory : bool ,
7
7
}
8
8
@@ -12,8 +12,6 @@ pub(super) mod function {
12
12
use anyhow:: { anyhow, bail, Context } ;
13
13
use gix:: bstr:: BString ;
14
14
use gix:: bstr:: ByteSlice ;
15
- use gix:: merge:: blob:: builtin_driver:: binary;
16
- use gix:: merge:: blob:: builtin_driver:: text:: Conflict ;
17
15
use gix:: merge:: tree:: UnresolvedConflict ;
18
16
use gix:: prelude:: Write ;
19
17
@@ -29,7 +27,7 @@ pub(super) mod function {
29
27
theirs : BString ,
30
28
Options {
31
29
format,
32
- resolve_content_merge ,
30
+ file_favor ,
33
31
in_memory,
34
32
} : Options ,
35
33
) -> anyhow:: Result < ( ) > {
@@ -44,17 +42,7 @@ pub(super) mod function {
44
42
let ( ours_ref, ours_id) = refname_and_tree ( & repo, ours) ?;
45
43
let ( theirs_ref, theirs_id) = refname_and_tree ( & repo, theirs) ?;
46
44
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) ;
58
46
let base_id_str = base_id. to_string ( ) ;
59
47
let ours_id_str = ours_id. to_string ( ) ;
60
48
let theirs_id_str = theirs_id. to_string ( ) ;
0 commit comments