mirror of
https://github.com/martinvonz/jj.git
synced 2024-11-11 13:46:02 +03:00
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:
parent
12a47bd6ed
commit
b9fe944e76
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user