diff --git a/CHANGELOG.md b/CHANGELOG.md index 263390d10..2ef8f1384 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,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 diff --git a/cli/src/commands/status.rs b/cli/src/commands/status.rs index 003085792..d8e08d356 100644 --- a/cli/src/commands/status.rs +++ b/cli/src/commands/status.rs @@ -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 @@ -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();