on master help sign in
Fix 'Tree::lookup_entry_by_path' usage
7c98b1cMichael Davis
helix-vcs/src/git.rs+1−1
@@ -126,7 +126,7 @@ fn find_file_in_commit(repo: &Repository, commit: &Commit, file: &Path) -> Resul
126 let rel_path = file.strip_prefix(repo_dir)?;
126 let rel_path = file.strip_prefix(repo_dir)?;
127 let tree = commit.tree()?;
127 let tree = commit.tree()?;
128 let tree_entry = tree
128 let tree_entry = tree
129− .lookup_entry_by_path(rel_path)?
129+ .lookup_entry_by_path(rel_path, &mut Vec::new())?
130 .context("file is untracked")?;
130 .context("file is untracked")?;
131 match tree_entry.mode() {
131 match tree_entry.mode() {
132 // not a file, everything is new, do not show diff
132 // not a file, everything is new, do not show diff