forked from mirrors/jj
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.
This commit is contained in:
parent
d09a8f50df
commit
4399ef54c1
1 changed files with 1 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue