mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
cleanup
This commit is contained in:
parent
9fed464f99
commit
25198101f2
1 changed files with 6 additions and 7 deletions
|
|
@ -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(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue