From 4399ef54c1e2d873d5a5fef150eba1fb39e49281 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Fri, 4 Nov 2022 18:46:45 -0700 Subject: [PATCH] test_rebase_command: avoid an unnecessary special case `jj new` can be used with 1 or more arguments to create non-merge commits or merge commits. --- tests/test_rebase_command.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_rebase_command.rs b/tests/test_rebase_command.rs index af4e7ce7c..5c9229232 100644 --- a/tests/test_rebase_command.rs +++ b/tests/test_rebase_command.rs @@ -20,9 +20,7 @@ pub mod common; fn create_commit(test_env: &TestEnvironment, repo_path: &Path, name: &str, parents: &[&str]) { if parents.is_empty() { - test_env.jj_cmd_success(repo_path, &["co", "root"]); - } else if parents.len() == 1 { - test_env.jj_cmd_success(repo_path, &["co", parents[0]]); + test_env.jj_cmd_success(repo_path, &["new", "root"]); } else { let mut args = vec!["new", "-m", name]; args.extend(parents);