rewrite: leverage root_id() helper on commit object

This commit is contained in:
Martin von Zweigbergk 2024-03-25 23:23:59 -07:00 committed by Martin von Zweigbergk
parent 0ef25bb4b6
commit f696f5b727

View file

@ -148,11 +148,11 @@ pub fn rebase_commit_with_options(
let old_parents = old_commit.parents();
let old_parent_trees = old_parents
.iter()
.map(|parent| parent.store_commit().root_tree.clone())
.map(|parent| parent.tree_id().clone())
.collect_vec();
let new_parent_trees = new_parents
.iter()
.map(|parent| parent.store_commit().root_tree.clone())
.map(|parent| parent.tree_id().clone())
.collect_vec();
let (old_base_tree_id, new_tree_id) = if new_parent_trees == old_parent_trees {