Skip to content

Commit

Permalink
Fetch descendants more correctly.
Browse files Browse the repository at this point in the history
See context in [this discussion](#3935 (comment))

Fixes #3947
  • Loading branch information
essiene committed Aug 24, 2024
1 parent 8d03c29 commit 661c1e3
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions cli/src/movement_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,20 @@ impl Direction {
args: &MovementArgsInternal,
) -> Result<Rc<RevsetExpression>, CommandError> {
let target_revset = match self {
Direction::Next => if args.conflict {
start_revset
.children()
.descendants()
.filtered(RevsetFilterPredicate::HasConflict)
.roots()
} else {
start_revset.descendants_at(args.offset)
Direction::Next => {
if args.conflict {
start_revset
.children()
.minus(working_revset)
.descendants()
.filtered(RevsetFilterPredicate::HasConflict)
.roots()
} else {
start_revset
.descendants_at(args.offset)
.minus(working_revset)
}
}
.minus(working_revset),

Direction::Prev => {
if args.conflict {
Expand Down

0 comments on commit 661c1e3

Please sign in to comment.