mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-18 23:02:31 +03:00
Merge pull request #3158 from gitbutlerapp/diff-tree-to-working-dir-with-index
performance: diff tree to working dir with index
This commit is contained in:
commit
33e861af42
@ -147,8 +147,11 @@ impl Repository {
|
||||
old_tree: Option<&Tree<'_>>,
|
||||
opts: Option<&mut git2::DiffOptions>,
|
||||
) -> Result<git2::Diff<'_>> {
|
||||
if let Ok(mut index) = self.0.index() {
|
||||
index.update_all(vec!["*"], None)?;
|
||||
}
|
||||
self.0
|
||||
.diff_tree_to_workdir(old_tree.map(Into::into), opts)
|
||||
.diff_tree_to_workdir_with_index(old_tree.map(Into::into), opts)
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user