@@ -3,9 +3,7 @@ use crate::tree::utils::{
33 to_components, track, unique_path_in_tree, ChangeList , ChangeListRef , PossibleConflict , TrackedChange , TreeNodes ,
44} ;
55use 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 } ;
97use bstr:: { BString , ByteSlice } ;
108use gix_diff:: tree:: recorder:: Location ;
119use gix_diff:: tree_with_rewrites:: Change ;
@@ -129,7 +127,7 @@ where
129127 let mut failed_on_first_conflict = false ;
130128 let mut should_fail_on_conflict = |conflict : Conflict | -> bool {
131129 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) {
133131 failed_on_first_conflict = true ;
134132 }
135133 }
@@ -1002,27 +1000,6 @@ where
10021000 } )
10031001}
10041002
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-
10261003fn involves_submodule ( a : & EntryMode , b : & EntryMode ) -> bool {
10271004 a. is_commit ( ) || b. is_commit ( )
10281005}
0 commit comments