Skip to content

Commit

Permalink
parallelize: drop redundant "Nothing changed." case
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
martinvonz committed Apr 18, 2024
1 parent 9beac13 commit b29608e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions cli/src/commands/parallelize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

use std::collections::HashMap;
use std::io::Write;

use indexmap::IndexSet;
use itertools::Itertools;
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit b29608e

Please sign in to comment.