return the merge result in the case the rebase bails

This commit is contained in:
Scott Chacon 2024-05-24 10:38:48 +02:00
parent af8133ef5c
commit 757a4690ca

View File

@ -519,8 +519,14 @@ pub fn update_base_branch(
new_target_commit.id(),
new_target_commit.id(),
branch.head,
)?;
if let Some(rebased_head_oid) = rebased_head_oid {
);
// rebase failed, just do the merge
if rebased_head_oid.is_err() {
return result_merge(branch)
}
if let Some(rebased_head_oid) = rebased_head_oid? {
// rebase worked out, rewrite the branch head
branch.head = rebased_head_oid;
branch.tree = branch_merge_index_tree_oid;