mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-18 18:27:38 +00:00
cli: rephrase diff summary header so it can be reused for commit/describe
This commit is contained in:
parent
e7d9e1ff9c
commit
d438f43224
2 changed files with 3 additions and 3 deletions
|
@ -2478,7 +2478,7 @@ fn description_template_for_cmd_split(
|
||||||
// Double-check this assumption for diffs that include file content.
|
// Double-check this assumption for diffs that include file content.
|
||||||
);
|
);
|
||||||
Ok(format!("JJ: {intro}\n{overall_commit_description}\n")
|
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: "))
|
+ &textwrap::indent(diff_summary, "JJ: "))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ fn test_split_by_paths() {
|
||||||
std::fs::read_to_string(test_env.env_root().join("editor0")).unwrap(), @r###"
|
std::fs::read_to_string(test_env.env_root().join("editor0")).unwrap(), @r###"
|
||||||
JJ: Enter commit description for the first part (parent).
|
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: A file2
|
||||||
|
|
||||||
JJ: Lines starting with "JJ: " (like this one) will be removed.
|
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###"
|
std::fs::read_to_string(test_env.env_root().join("editor1")).unwrap(), @r###"
|
||||||
JJ: Enter commit description for the second part (child).
|
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 file1
|
||||||
JJ: A file3
|
JJ: A file3
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue