From d438f43224826b836b0f180774eae3088e870bb9 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Fri, 23 Dec 2022 00:07:13 +0900 Subject: [PATCH] cli: rephrase diff summary header so it can be reused for commit/describe --- src/commands.rs | 2 +- tests/test_split_command.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands.rs b/src/commands.rs index 2e8b7e4ca..088d1d2c7 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -2478,7 +2478,7 @@ fn description_template_for_cmd_split( // Double-check this assumption for diffs that include file content. ); Ok(format!("JJ: {intro}\n{overall_commit_description}\n") - + "JJ: This part contains the following changes:\n" + + "JJ: This commit contains the following changes:\n" + &textwrap::indent(diff_summary, "JJ: ")) } diff --git a/tests/test_split_command.rs b/tests/test_split_command.rs index f15ac7479..b0be67765 100644 --- a/tests/test_split_command.rs +++ b/tests/test_split_command.rs @@ -48,7 +48,7 @@ fn test_split_by_paths() { std::fs::read_to_string(test_env.env_root().join("editor0")).unwrap(), @r###" JJ: Enter commit description for the first part (parent). - JJ: This part contains the following changes: + JJ: This commit contains the following changes: JJ: A file2 JJ: Lines starting with "JJ: " (like this one) will be removed. @@ -57,7 +57,7 @@ fn test_split_by_paths() { std::fs::read_to_string(test_env.env_root().join("editor1")).unwrap(), @r###" JJ: Enter commit description for the second part (child). - JJ: This part contains the following changes: + JJ: This commit contains the following changes: JJ: A file1 JJ: A file3