diff --git a/lib/src/default_revset_engine.rs b/lib/src/default_revset_engine.rs index 6e3305762..a59ba17a8 100644 --- a/lib/src/default_revset_engine.rs +++ b/lib/src/default_revset_engine.rs @@ -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 }) }