Skip to content

Commit 35c709d

Browse files
committed
Rename pathspec to path
1 parent b211b1b commit 35c709d

File tree

1 file changed

+4
-4
lines changed
  • gitoxide-core/src/repository

1 file changed

+4
-4
lines changed

gitoxide-core/src/repository/log.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use gix::bstr::{BStr, BString, ByteSlice};
22
use gix::prelude::FindExt;
33
use gix::ObjectId;
44

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<()> {
66
repo.object_cache_size_if_unset(repo.compute_object_cache_size_for_tree_diffs(&**repo.index_or_empty()?));
77

88
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
1717
let tree_ref = repo.find_tree(commit.tree_id().unwrap()).unwrap();
1818
let tree = tree_ref.decode().unwrap();
1919

20-
let Some(entry) = tree.bisect_entry(pathspec.as_ref(), false) else {
20+
let Some(entry) = tree.bisect_entry(path.as_ref(), false) else {
2121
continue;
2222
};
2323

@@ -43,7 +43,7 @@ pub fn log(mut repo: gix::Repository, out: &mut dyn std::io::Write, pathspec: BS
4343
.find_tree(&parent_commit.tree_id().unwrap(), &mut buffer)
4444
.unwrap();
4545

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) {
4747
if entry.oid == parent_entry.oid {
4848
// The blobs storing the file in `entry` and `parent_entry` are
4949
// 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
6565

6666
for parent_id in parent_ids_with_changes {
6767
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());
6969

7070
if !modifications.is_empty() {
7171
write_info(&repo, &mut *out, &info)?;

0 commit comments

Comments
 (0)