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

templater: propagate error from commit.parents() method

This commit is contained in:
Yuya Nishihara 2024-05-14 09:29:33 +09:00
parent 1b6589a463
commit a61f91b8cf

View file

@ -463,7 +463,8 @@ fn builtin_commit_methods<'repo>() -> CommitTemplateBuildMethodFnMap<'repo, Comm
"parents",
|_language, _build_ctx, self_property, function| {
template_parser::expect_no_arguments(function)?;
let out_property = self_property.map(|commit| commit.parents().try_collect().unwrap());
let out_property =
self_property.and_then(|commit| Ok(commit.parents().try_collect()?));
Ok(L::wrap_commit_list(out_property))
},
);