mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-20 11:25:34 +00:00
op diff: pass DiffRenderer in to show_op_diff() by reference
show_op_diff() doesn't need an ownership of renderer.
This commit is contained in:
parent
5bff5cdef0
commit
b7caaf586b
2 changed files with 3 additions and 3 deletions
|
@ -160,7 +160,7 @@ pub fn cmd_op_diff(
|
||||||
&commit_summary_template,
|
&commit_summary_template,
|
||||||
(!args.no_graph).then_some(graph_style),
|
(!args.no_graph).then_some(graph_style),
|
||||||
&with_content_format,
|
&with_content_format,
|
||||||
diff_renderer,
|
diff_renderer.as_ref(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ pub fn show_op_diff(
|
||||||
commit_summary_template: &TemplateRenderer<Commit>,
|
commit_summary_template: &TemplateRenderer<Commit>,
|
||||||
graph_style: Option<GraphStyle>,
|
graph_style: Option<GraphStyle>,
|
||||||
with_content_format: &LogContentFormat,
|
with_content_format: &LogContentFormat,
|
||||||
diff_renderer: Option<DiffRenderer>,
|
diff_renderer: Option<&DiffRenderer>,
|
||||||
) -> Result<(), CommandError> {
|
) -> Result<(), CommandError> {
|
||||||
let changes = compute_operation_commits_diff(current_repo, from_repo, to_repo)?;
|
let changes = compute_operation_commits_diff(current_repo, from_repo, to_repo)?;
|
||||||
|
|
||||||
|
|
|
@ -93,6 +93,6 @@ pub fn cmd_op_show(
|
||||||
&commit_summary_template,
|
&commit_summary_template,
|
||||||
(!args.no_graph).then_some(graph_style),
|
(!args.no_graph).then_some(graph_style),
|
||||||
&with_content_format,
|
&with_content_format,
|
||||||
diff_renderer,
|
diff_renderer.as_ref(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue