From b29608ef825b80bf823a56fb684d18dc0ee1bb64 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Wed, 17 Apr 2024 21:55:50 -0700 Subject: [PATCH] parallelize: drop redundant "Nothing changed." case The rewritten code is already a no-op when there's a single input. I don't think the case is common enough to warrant having a special case for performance reasons either. Also, by not having the special case, `jj parallelize ` fails consistently with the non-singleton case. --- cli/src/commands/parallelize.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cli/src/commands/parallelize.rs b/cli/src/commands/parallelize.rs index 8b369d8c54..b3ba41ebb7 100644 --- a/cli/src/commands/parallelize.rs +++ b/cli/src/commands/parallelize.rs @@ -13,7 +13,6 @@ // limitations under the License. use std::collections::HashMap; -use std::io::Write; use indexmap::IndexSet; use itertools::Itertools; @@ -70,10 +69,6 @@ pub(crate) fn cmd_parallelize( .parse_union_revsets(&args.revisions)? .evaluate_to_commits()? .try_collect()?; - if target_commits.len() < 2 { - writeln!(ui.status(), "Nothing changed.")?; - return Ok(()); - } workspace_command.check_rewritable(target_commits.iter().ids())?; let mut tx = workspace_command.start_transaction();