mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 08:58: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
|
||||
};
|
||||
|
||||
let mut opt = pathspec.as_ref().map(|p| {
|
||||
let mut opts = DiffOptions::new();
|
||||
opts.pathspec(p);
|
||||
opts.show_binary(true);
|
||||
opts
|
||||
});
|
||||
let mut opts = DiffOptions::new();
|
||||
if let Some(p) = &pathspec {
|
||||
opts.pathspec(p.clone());
|
||||
}
|
||||
opts.show_binary(true);
|
||||
|
||||
let mut diff = repo.diff_tree_to_tree(
|
||||
parent.as_ref(),
|
||||
Some(&commit_tree),
|
||||
opt.as_mut(),
|
||||
Some(&mut opts),
|
||||
)?;
|
||||
|
||||
if is_stash_commit(
|
||||
|
|
|
|||
Loading…
Reference in a new issue