File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
crates/gitbutler-branch-actions/src Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -1101,11 +1101,18 @@ pub fn is_remote_branch_mergeable(
11011101 let wd_tree = ctx. repository ( ) . create_wd_tree ( ) ?;
11021102
11031103 let branch_tree = branch_commit. tree ( ) . context ( "failed to find branch tree" ) ?;
1104- let mergeable = !ctx
1105- . repository ( )
1106- . merge_trees ( & base_tree, & branch_tree, & wd_tree, None )
1104+ let gix_repo_in_memory = ctx. gix_repository_for_merging ( ) ?. with_object_memory ( ) ;
1105+ let ( merge_options_fail_fast, conflict_kind) = gix_repo_in_memory. merge_options_fail_fast ( ) ?;
1106+ let mergeable = !gix_repo_in_memory
1107+ . merge_trees (
1108+ git2_to_gix_object_id ( base_tree. id ( ) ) ,
1109+ git2_to_gix_object_id ( branch_tree. id ( ) ) ,
1110+ git2_to_gix_object_id ( wd_tree. id ( ) ) ,
1111+ Default :: default ( ) ,
1112+ merge_options_fail_fast,
1113+ )
11071114 . context ( "failed to merge trees" ) ?
1108- . has_conflicts ( ) ;
1115+ . has_unresolved_conflicts ( conflict_kind ) ;
11091116
11101117 Ok ( mergeable)
11111118}
You can’t perform that action at this time.
0 commit comments