mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-18 18:27:38 +00:00
MutableRepo: in fast-path for adding head, simply remove parent heads
This commit is contained in:
parent
2c92fca75a
commit
3ecb4ec16b
1 changed files with 3 additions and 1 deletions
|
@ -635,7 +635,9 @@ impl<'r> MutableRepo<'r> {
|
||||||
{
|
{
|
||||||
self.index.add_commit(head);
|
self.index.add_commit(head);
|
||||||
self.view.add_head(head.id());
|
self.view.add_head(head.id());
|
||||||
self.enforce_view_invariants();
|
for parent_id in head.parent_ids() {
|
||||||
|
self.view.remove_head(&parent_id);
|
||||||
|
}
|
||||||
if let Some(evolution) = self.evolution_mut() {
|
if let Some(evolution) = self.evolution_mut() {
|
||||||
evolution.add_commit(head)
|
evolution.add_commit(head)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue