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 <immutable commit>` fails consistently with the
non-singleton case.
This commit is contained in:
Martin von Zweigbergk 2024-04-17 21:55:50 -07:00 committed by Martin von Zweigbergk
parent 89356aebc6
commit 449fc423b8

View file

@ -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();