From d0bf8710c3781055a538a8b93152e4ef80ce7c30 Mon Sep 17 00:00:00 2001 From: Eric Roshan-Eisner Date: Mon, 6 May 2024 08:42:43 -0700 Subject: [PATCH] cli: status: only scan through mutable changes to find conflicts Fixes #3628 --- CHANGELOG.md | 2 ++ cli/src/commands/status.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9700c7f75b..484d3f0810 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/cli/src/commands/status.rs b/cli/src/commands/status.rs index 0030857922..d8e08d356e 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();