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

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.
This commit is contained in:
Martin von Zweigbergk 2024-03-23 09:29:29 -07:00 committed by Martin von Zweigbergk
parent 5e8d7f8c6f
commit 0481e67dfd

View file

@ -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 {