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

revset: use unstable sort to enforce ordering of commit ids

This wouldn't matter in practice, but there should be no reason to stick
to stable sort.
This commit is contained in:
Yuya Nishihara 2023-03-25 19:20:15 +09:00
parent bac2de6ac6
commit d04556cf18

View file

@ -717,7 +717,7 @@ fn revset_for_commit_ids<'index>(
for id in commit_ids {
index_entries.push(index.entry_by_id(id).unwrap());
}
index_entries.sort_by_key(|b| Reverse(b.position()));
index_entries.sort_unstable_by_key(|b| Reverse(b.position()));
index_entries.dedup();
Box::new(EagerRevset { index_entries })
}