@@ -3,9 +3,7 @@ use crate::tree::utils::{
3
3
to_components, track, unique_path_in_tree, ChangeList , ChangeListRef , PossibleConflict , TrackedChange , TreeNodes ,
4
4
} ;
5
5
use crate :: tree:: ConflictMapping :: { Original , Swapped } ;
6
- use crate :: tree:: {
7
- Conflict , ConflictMapping , ContentMerge , Error , Options , Outcome , Resolution , ResolutionFailure , UnresolvedConflict ,
8
- } ;
6
+ use crate :: tree:: { Conflict , ConflictMapping , ContentMerge , Error , Options , Outcome , Resolution , ResolutionFailure } ;
9
7
use bstr:: { BString , ByteSlice } ;
10
8
use gix_diff:: tree:: recorder:: Location ;
11
9
use gix_diff:: tree_with_rewrites:: Change ;
@@ -129,7 +127,7 @@ where
129
127
let mut failed_on_first_conflict = false ;
130
128
let mut should_fail_on_conflict = |conflict : Conflict | -> bool {
131
129
if let Some ( how) = options. fail_on_conflict {
132
- if conflict. resolution . is_err ( ) || is_unresolved ( std :: slice :: from_ref ( & conflict ) , how) {
130
+ if conflict. resolution . is_err ( ) || conflict . is_unresolved ( how) {
133
131
failed_on_first_conflict = true ;
134
132
}
135
133
}
@@ -1002,27 +1000,6 @@ where
1002
1000
} )
1003
1001
}
1004
1002
1005
- pub ( super ) fn is_unresolved ( conflicts : & [ Conflict ] , how : UnresolvedConflict ) -> bool {
1006
- match how {
1007
- UnresolvedConflict :: ConflictMarkers => conflicts. iter ( ) . any ( |c| {
1008
- c. resolution . is_err ( )
1009
- || c. content_merge ( ) . map_or ( false , |info| {
1010
- matches ! ( info. resolution, crate :: blob:: Resolution :: Conflict )
1011
- } )
1012
- } ) ,
1013
- UnresolvedConflict :: Renames => conflicts. iter ( ) . any ( |c| match & c. resolution {
1014
- Ok ( success) => match success {
1015
- Resolution :: SourceLocationAffectedByRename { .. }
1016
- | Resolution :: OursModifiedTheirsRenamedAndChangedThenRename { .. } => true ,
1017
- Resolution :: OursModifiedTheirsModifiedThenBlobContentMerge { merged_blob } => {
1018
- matches ! ( merged_blob. resolution, crate :: blob:: Resolution :: Conflict )
1019
- }
1020
- } ,
1021
- Err ( _failure) => true ,
1022
- } ) ,
1023
- }
1024
- }
1025
-
1026
1003
fn involves_submodule ( a : & EntryMode , b : & EntryMode ) -> bool {
1027
1004
a. is_commit ( ) || b. is_commit ( )
1028
1005
}
0 commit comments