We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
gix blame
1 parent 16b5058 commit fa76de6Copy full SHA for fa76de6
gitoxide-core/src/repository/blame.rs
@@ -2,7 +2,9 @@ use std::{ffi::OsStr, path::PathBuf, str::Lines};
2
3
use gix::bstr::BStr;
4
5
-pub fn blame_file(repo: gix::Repository, file: &OsStr, out: impl std::io::Write) -> anyhow::Result<()> {
+pub fn blame_file(mut repo: gix::Repository, file: &OsStr, out: impl std::io::Write) -> anyhow::Result<()> {
6
+ repo.object_cache_size_if_unset(repo.compute_object_cache_size_for_tree_diffs(&**repo.index_or_empty()?));
7
+
8
let suspect = repo.head()?.peel_to_commit_in_place()?;
9
let traverse: Vec<_> = gix::traverse::commit::Simple::new(Some(suspect.id), &repo.objects).collect();
10
let mut resource_cache = repo.diff_resource_cache_for_tree_diff()?;
0 commit comments