Fix breaking change in gix Tree::loop_entry_by_path

This commit is contained in:
Michael Davis 2024-10-30 14:31:52 -04:00 committed by Blaž Hrastnik
parent b5d56e57a6
commit 9806ca08b1

View File

@ -198,7 +198,7 @@ fn find_file_in_commit(repo: &Repository, commit: &Commit, file: &Path) -> Resul
let rel_path = file.strip_prefix(repo_dir)?; let rel_path = file.strip_prefix(repo_dir)?;
let tree = commit.tree()?; let tree = commit.tree()?;
let tree_entry = tree let tree_entry = tree
.lookup_entry_by_path(rel_path, &mut Vec::new())? .lookup_entry_by_path(rel_path)?
.context("file is untracked")?; .context("file is untracked")?;
match tree_entry.mode().kind() { match tree_entry.mode().kind() {
// not a file, everything is new, do not show diff // not a file, everything is new, do not show diff