Skip to content

Commit

Permalink
cli: status: only scan through mutable changes to find conflicts
Browse files Browse the repository at this point in the history
Fixes #3628
  • Loading branch information
edre committed May 6, 2024
1 parent 2e44741 commit d0bf871
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed bugs

* `jj status` no longer scans through the entire history to look for ancestors with conflicts.

## [0.17.0] - 2024-05-01

### Breaking changes
Expand Down
4 changes: 4 additions & 0 deletions cli/src/commands/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use tracing::instrument;
use crate::cli_util::{print_conflicted_paths, CommandHelper};
use crate::command_error::CommandError;
use crate::diff_util;
use crate::revset_util;
use crate::ui::Ui;

/// Show high-level repo status
Expand Down Expand Up @@ -98,6 +99,9 @@ pub(crate) fn cmd_status(
let ancestors_conflicts = RevsetExpression::filter(RevsetFilterPredicate::HasConflict)
.intersection(&wc_revset.ancestors())
.minus(&wc_revset)
.minus(&revset_util::parse_immutable_expression(
&workspace_command.revset_parse_context(),
)?)
.evaluate_programmatic(repo.as_ref())?
.iter()
.collect();
Expand Down

0 comments on commit d0bf871

Please sign in to comment.