@@ -770,7 +770,7 @@ pub fn blame_file<E>(
770
770
// TODO Verify that `imara-diff` tokenizes lines the same way `lines` does.
771
771
let number_of_lines = std:: fs:: read_to_string ( absolute_path) . unwrap ( ) . lines ( ) . count ( ) ;
772
772
773
- let mut lines_to_blame : Vec < UnblamedHunk > = vec ! [ UnblamedHunk :: new(
773
+ let mut hunks_to_blame : Vec < UnblamedHunk > = vec ! [ UnblamedHunk :: new(
774
774
0 ..number_of_lines. try_into( ) . unwrap( ) ,
775
775
Offset :: Added ( 0 ) ,
776
776
) ] ;
@@ -787,7 +787,7 @@ pub fn blame_file<E>(
787
787
// remaining lines to it, even though we don’t explicitly check whether that is true
788
788
// here. We could perhaps use `needed_to_obtain` to compare `suspect` against an empty
789
789
// tree to validate this assumption.
790
- out. extend ( lines_to_blame . iter ( ) . map ( |hunk| {
790
+ out. extend ( hunks_to_blame . iter ( ) . map ( |hunk| {
791
791
BlameEntry :: new (
792
792
hunk. range_in_blamed_file . clone ( ) ,
793
793
// TODO
@@ -798,7 +798,7 @@ pub fn blame_file<E>(
798
798
)
799
799
} ) ) ;
800
800
801
- lines_to_blame = vec ! [ ] ;
801
+ hunks_to_blame = vec ! [ ] ;
802
802
803
803
break ;
804
804
}
@@ -820,7 +820,7 @@ pub fn blame_file<E>(
820
820
gix_diff:: tree:: recorder:: Change :: Addition { .. } => {
821
821
// Every line that has not been blamed yet on a commit, is expected to have been
822
822
// added when the file was added to the repository.
823
- out. extend ( lines_to_blame . iter ( ) . map ( |hunk| {
823
+ out. extend ( hunks_to_blame . iter ( ) . map ( |hunk| {
824
824
BlameEntry :: new (
825
825
hunk. range_in_blamed_file . clone ( ) ,
826
826
// TODO
@@ -831,20 +831,20 @@ pub fn blame_file<E>(
831
831
)
832
832
} ) ) ;
833
833
834
- lines_to_blame = vec ! [ ] ;
834
+ hunks_to_blame = vec ! [ ] ;
835
835
836
836
break ;
837
837
}
838
838
gix_diff:: tree:: recorder:: Change :: Deletion { .. } => todo ! ( ) ,
839
839
gix_diff:: tree:: recorder:: Change :: Modification { previous_oid, oid, .. } => {
840
840
let changes = get_changes ( & odb, resource_cache, * oid, * previous_oid, file_path) ;
841
841
842
- lines_to_blame = process_changes ( & mut out, & lines_to_blame , & changes, suspect) ;
842
+ hunks_to_blame = process_changes ( & mut out, & hunks_to_blame , & changes, suspect) ;
843
843
}
844
844
}
845
845
}
846
846
847
- assert_eq ! ( lines_to_blame , vec![ ] ) ;
847
+ assert_eq ! ( hunks_to_blame , vec![ ] ) ;
848
848
849
849
// I don’t know yet whether it would make sense to use a data structure instead that preserves
850
850
// order on insertion.
0 commit comments