diff --git a/lib/src/default_index/revset_engine.rs b/lib/src/default_index/revset_engine.rs index c4d68bb67de..7dd845ffc1b 100644 --- a/lib/src/default_index/revset_engine.rs +++ b/lib/src/default_index/revset_engine.rs @@ -1092,6 +1092,11 @@ fn build_predicate_fn( .unwrap() }) } + RevsetFilterPredicate::HasNoConflict => box_pure_predicate_fn(move |index, pos| { + let entry = index.entry_by_pos(pos); + let commit = store.get_commit(&entry.commit_id()).unwrap(); + !commit.has_conflict().unwrap() + }), RevsetFilterPredicate::HasConflict => box_pure_predicate_fn(move |index, pos| { let entry = index.entry_by_pos(pos); let commit = store.get_commit(&entry.commit_id()).unwrap(); diff --git a/lib/src/revset.rs b/lib/src/revset.rs index afee11cfef2..58c8a6eda96 100644 --- a/lib/src/revset.rs +++ b/lib/src/revset.rs @@ -139,6 +139,8 @@ pub enum RevsetFilterPredicate { text: StringPattern, files: FilesetExpression, }, + /// Commits without conflicts + HasNoConflict, /// Commits with conflicts HasConflict, /// Custom predicates provided by extensions