mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 01:16:18 +04:00
Fix 'Tree::lookup_entry_by_path' usage
This commit is contained in:
parent
a6ab062b2d
commit
7c98b1c829
@ -126,7 +126,7 @@ fn find_file_in_commit(repo: &Repository, commit: &Commit, file: &Path) -> Resul
|
||||
let rel_path = file.strip_prefix(repo_dir)?;
|
||||
let tree = commit.tree()?;
|
||||
let tree_entry = tree
|
||||
.lookup_entry_by_path(rel_path)?
|
||||
.lookup_entry_by_path(rel_path, &mut Vec::new())?
|
||||
.context("file is untracked")?;
|
||||
match tree_entry.mode() {
|
||||
// not a file, everything is new, do not show diff
|
||||
|
Loading…
Reference in New Issue
Block a user