forked from mirrors/jj
op_heads: ensure that update_op_heads([id], id) fails
The doc states it's invalid, but I made such bug.
This commit is contained in:
parent
3f0a49dafe
commit
392e83be42
1 changed files with 1 additions and 0 deletions
|
@ -76,6 +76,7 @@ impl OpHeadsStore for SimpleOpHeadsStore {
|
|||
}
|
||||
|
||||
fn update_op_heads(&self, old_ids: &[OperationId], new_id: &OperationId) {
|
||||
assert!(!old_ids.contains(new_id));
|
||||
self.add_op_head(new_id);
|
||||
for old_id in old_ids {
|
||||
self.remove_op_head(old_id)
|
||||
|
|
Loading…
Reference in a new issue