mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-12 07:14:38 +00:00
templater: propagate error from commit.parents() method
This commit is contained in:
parent
1b6589a463
commit
a61f91b8cf
1 changed files with 2 additions and 1 deletions
|
@ -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))
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue