ok/jj
1
0
Fork 0
forked from mirrors/jj

cli: leverage parse_operation_template() in cmd_op_show()

This commit is contained in:
Yuya Nishihara 2024-09-20 10:51:13 +09:00
parent 7e04af1729
commit dd9213a954

View file

@ -23,7 +23,6 @@ use crate::diff_util::diff_formats_for_log;
use crate::diff_util::DiffFormatArgs;
use crate::diff_util::DiffRenderer;
use crate::graphlog::GraphStyle;
use crate::operation_templater::OperationTemplateLanguage;
use crate::ui::Ui;
/// Show changes to the repository in an operation
@ -80,10 +79,9 @@ pub fn cmd_op_show(
// TODO: Should we make this customizable via clap arg?
let template = {
let language = workspace_command.operation_template_language();
let text = command.settings().config().get_string("templates.op_log")?;
workspace_command
.parse_template(&language, &text, OperationTemplateLanguage::wrap_operation)?
.parse_operation_template(&text)?
.labeled("op_log")
};