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

view: remove unnecessary removing of parents in add_head()

We call `enforce_invariants()` right after removing the parent
commits, and that will remove parents anyway.
This commit is contained in:
Martin von Zweigbergk 2021-03-14 11:08:31 -07:00
parent 12a47bd6ed
commit b9fe944e76

View file

@ -243,9 +243,6 @@ impl MutableView {
pub fn add_head(&mut self, head: &Commit) {
self.data.head_ids.insert(head.id().clone());
for parent in head.parents() {
self.data.head_ids.remove(parent.id());
}
enforce_invariants(&self.store, &mut self.data);
}