This commit is contained in:
Stephan Dilly 2021-03-10 15:44:42 +01:00
parent 9fed464f99
commit 25198101f2

View file

@ -54,17 +54,16 @@ pub(crate) fn get_commit_diff(
None None
}; };
let mut opt = pathspec.as_ref().map(|p| { let mut opts = DiffOptions::new();
let mut opts = DiffOptions::new(); if let Some(p) = &pathspec {
opts.pathspec(p); opts.pathspec(p.clone());
opts.show_binary(true); }
opts opts.show_binary(true);
});
let mut diff = repo.diff_tree_to_tree( let mut diff = repo.diff_tree_to_tree(
parent.as_ref(), parent.as_ref(),
Some(&commit_tree), Some(&commit_tree),
opt.as_mut(), Some(&mut opts),
)?; )?;
if is_stash_commit( if is_stash_commit(