From e5ec99d15919f783b54d2b1382e1aa57d6ef056f Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Sun, 27 Aug 2023 05:49:29 -0700 Subject: [PATCH] backout: propagate error from merging of trees --- lib/src/rewrite.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/rewrite.rs b/lib/src/rewrite.rs index df0163fe7..d8c16657c 100644 --- a/lib/src/rewrite.rs +++ b/lib/src/rewrite.rs @@ -108,7 +108,7 @@ pub fn back_out_commit( ) -> Result { let old_base_tree = merge_commit_trees(mut_repo, &old_commit.parents())?; let new_base_tree = merge_commit_trees(mut_repo, new_parents)?; - let new_tree = merge_trees(&new_base_tree, &old_commit.tree(), &old_base_tree).unwrap(); + let new_tree = merge_trees(&new_base_tree, &old_commit.tree(), &old_base_tree)?; let new_parent_ids = new_parents .iter() .map(|commit| commit.id().clone())