mirror of
https://github.com/gitui-org/gitui.git
synced 2026-10-12 02:14:16 +00:00
cleanup
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user