@@ -269,7 +269,15 @@ pub fn file(
269
269
unreachable ! ( "We already found file_path in suspect^{{tree}}, so it can't be deleted" )
270
270
}
271
271
gix_diff:: tree:: recorder:: Change :: Modification { previous_oid, oid, .. } => {
272
- let changes = blob_changes ( & odb, resource_cache, oid, previous_oid, file_path, & mut stats) ?;
272
+ let changes = blob_changes (
273
+ & odb,
274
+ resource_cache,
275
+ oid,
276
+ previous_oid,
277
+ file_path,
278
+ options. diff_algorithm ,
279
+ & mut stats,
280
+ ) ?;
273
281
hunks_to_blame = process_changes ( hunks_to_blame, changes, suspect, parent_id) ;
274
282
}
275
283
}
@@ -553,6 +561,7 @@ fn blob_changes(
553
561
oid : ObjectId ,
554
562
previous_oid : ObjectId ,
555
563
file_path : & BStr ,
564
+ diff_algorithm : gix_diff:: blob:: Algorithm ,
556
565
stats : & mut Statistics ,
557
566
) -> Result < Vec < Change > , Error > {
558
567
/// Record all [`Change`]s to learn about additions, deletions and unchanged portions of a *Source File*.
@@ -631,7 +640,7 @@ fn blob_changes(
631
640
let number_of_lines_in_destination = input. after . len ( ) ;
632
641
let change_recorder = ChangeRecorder :: new ( number_of_lines_in_destination as u32 ) ;
633
642
634
- let res = gix_diff:: blob:: diff ( gix_diff :: blob :: Algorithm :: Histogram , & input, change_recorder) ;
643
+ let res = gix_diff:: blob:: diff ( diff_algorithm , & input, change_recorder) ;
635
644
stats. blobs_diffed += 1 ;
636
645
Ok ( res)
637
646
}
0 commit comments