diff --git a/src/commands.rs b/src/commands.rs index b816dcc88..25a92e0a5 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -1117,12 +1117,12 @@ fn cmd_status( let mut repo_command = command.repo_helper(ui)?; let commit = repo_command.commit_working_copy(); let repo = repo_command.repo(); - ui.write("Working copy : ")?; - ui.write_commit_summary(repo.as_repo_ref(), &commit)?; - ui.write("\n")?; ui.write("Parent commit: ")?; ui.write_commit_summary(repo.as_repo_ref(), &commit.parents()[0])?; ui.write("\n")?; + ui.write("Working copy : ")?; + ui.write_commit_summary(repo.as_repo_ref(), &commit)?; + ui.write("\n")?; let summary = commit.parents()[0].tree().diff_summary(&commit.tree()); if summary.is_empty() { ui.write("The working copy is clean\n")?; diff --git a/tests/smoke_test.rs b/tests/smoke_test.rs index 061cd7d1f..5157c8f24 100644 --- a/tests/smoke_test.rs +++ b/tests/smoke_test.rs @@ -28,8 +28,8 @@ fn smoke_test() { assert_eq!(output.status, 0); let stdout_string = output.stdout_string(); let output_regex = Regex::new( - "^Working copy : ([[:xdigit:]]+) \n\ - Parent commit: 000000000000 \n\ + "^Parent commit: 000000000000 \n\ + Working copy : ([[:xdigit:]]+) \n\ The working copy is clean\n\ $", ) @@ -56,8 +56,8 @@ fn smoke_test() { assert_eq!(output.status, 0); let stdout_string = output.stdout_string(); let output_regex = Regex::new( - "^Working copy : ([[:xdigit:]]+) \n\ - Parent commit: 000000000000 \n\ + "^Parent commit: 000000000000 \n\ + Working copy : ([[:xdigit:]]+) \n\ Working copy changes:\n\ A file1\n\ A file2\n\