@@ -2,7 +2,7 @@ use gix::bstr::{BStr, BString, ByteSlice};
2
2
use gix:: prelude:: FindExt ;
3
3
use gix:: ObjectId ;
4
4
5
- pub fn log ( mut repo : gix:: Repository , out : & mut dyn std:: io:: Write , pathspec : BString ) -> anyhow:: Result < ( ) > {
5
+ pub fn log ( mut repo : gix:: Repository , out : & mut dyn std:: io:: Write , path : BString ) -> anyhow:: Result < ( ) > {
6
6
repo. object_cache_size_if_unset ( repo. compute_object_cache_size_for_tree_diffs ( & * * repo. index_or_empty ( ) ?) ) ;
7
7
8
8
let head = repo. head ( ) ?. peel_to_commit_in_place ( ) ?;
@@ -17,7 +17,7 @@ pub fn log(mut repo: gix::Repository, out: &mut dyn std::io::Write, pathspec: BS
17
17
let tree_ref = repo. find_tree ( commit. tree_id ( ) . unwrap ( ) ) . unwrap ( ) ;
18
18
let tree = tree_ref. decode ( ) . unwrap ( ) ;
19
19
20
- let Some ( entry) = tree. bisect_entry ( pathspec . as_ref ( ) , false ) else {
20
+ let Some ( entry) = tree. bisect_entry ( path . as_ref ( ) , false ) else {
21
21
continue ;
22
22
} ;
23
23
@@ -43,7 +43,7 @@ pub fn log(mut repo: gix::Repository, out: &mut dyn std::io::Write, pathspec: BS
43
43
. find_tree ( & parent_commit. tree_id ( ) . unwrap ( ) , & mut buffer)
44
44
. unwrap ( ) ;
45
45
46
- if let Some ( parent_entry) = parent_tree. bisect_entry ( pathspec . as_ref ( ) , false ) {
46
+ if let Some ( parent_entry) = parent_tree. bisect_entry ( path . as_ref ( ) , false ) {
47
47
if entry. oid == parent_entry. oid {
48
48
// The blobs storing the file in `entry` and `parent_entry` are
49
49
// identical which means the file was not changed in `commit`.
@@ -65,7 +65,7 @@ pub fn log(mut repo: gix::Repository, out: &mut dyn std::io::Write, pathspec: BS
65
65
66
66
for parent_id in parent_ids_with_changes {
67
67
let modifications =
68
- get_modifications_for_file_path ( & repo. objects , pathspec . as_ref ( ) , commit. id , parent_id. into ( ) ) ;
68
+ get_modifications_for_file_path ( & repo. objects , path . as_ref ( ) , commit. id , parent_id. into ( ) ) ;
69
69
70
70
if !modifications. is_empty ( ) {
71
71
write_info ( & repo, & mut * out, & info) ?;
0 commit comments