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 23, 2024
1 parent 3a3d234 commit acc6802
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions cli/src/movement_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,21 @@ 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
.children()
.minus(working_revset)
.descendants_at(args.offset)
}
}
.minus(working_revset),

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

0 comments on commit acc6802

Please sign in to comment.