From 0481e67dfdb88f265174f27c359a545d144977ee Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Sat, 23 Mar 2024 09:29:29 -0700 Subject: [PATCH] rewrite: drop now-unnecessary updating of `branches` map Since we update all branches at the end now, we never update them in several steps, so there are no intermediate locations we need to remember. --- lib/src/rewrite.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/src/rewrite.rs b/lib/src/rewrite.rs index 86a876a3b..b7403a992 100644 --- a/lib/src/rewrite.rs +++ b/lib/src/rewrite.rs @@ -476,12 +476,6 @@ impl<'settings, 'repo> DescendantRebaser<'settings, 'repo> { if let Some(branch_names) = self.branches.get(&old_commit_id).cloned() { let mut branch_updates = vec![]; for branch_name in &branch_names { - for new_commit_id in &new_commit_ids { - self.branches - .entry(new_commit_id.clone()) - .or_default() - .insert(branch_name.clone()); - } let local_target = self.mut_repo.get_local_branch(branch_name); for old_add in local_target.added_ids() { if *old_add == old_commit_id {