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

commit_templater: avoid looking up tree only to get its id

This commit is contained in:
Martin von Zweigbergk 2023-07-07 01:35:10 -07:00 committed by Martin von Zweigbergk
parent 7bcb01ae5e
commit eebc2ef5a1

View file

@ -259,7 +259,7 @@ fn build_commit_keyword_opt<'repo>(
}
"empty" => language.wrap_boolean(wrap_fn(property, |commit| {
let parent_tree = rewrite::merge_commit_trees(repo, &commit.parents()).unwrap();
commit.tree().id() == parent_tree.id()
commit.tree_id() == parent_tree.id()
})),
_ => return None,
};