-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: remove author name from default annotate template, reorder fields
The problem is that we don't have a padding function yet, so the output wasn't aligned. I also don't like lengthy metadata that moves contents away from the visible screen area. This patch also reorders fields to match the log output. I don't have a strong opinion about that.
- Loading branch information
Showing
2 changed files
with
23 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,10 +38,10 @@ fn test_annotate_linear() { | |
append_to_file(&repo_path.join("file.txt"), "new text from new commit"); | ||
|
||
let stdout = test_env.jj_cmd_success(&repo_path, &["file", "annotate", "file.txt"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
qpvuntsm 8934c772 [email protected] 2001-02-03 08:05:08 1: line1 | ||
kkmpptxz 41ae16e6 [email protected] 2001-02-03 08:05:10 2: new text from new commit | ||
"###); | ||
insta::assert_snapshot!(stdout, @r#" | ||
qpvuntsm 2001-02-03 08:05:08 8934c772 1: line1 | ||
kkmpptxz 2001-02-03 08:05:10 41ae16e6 2: new text from new commit | ||
"#); | ||
} | ||
|
||
#[test] | ||
|
@@ -72,11 +72,11 @@ fn test_annotate_merge() { | |
.unwrap(); | ||
|
||
let stdout = test_env.jj_cmd_success(&repo_path, &["file", "annotate", "file.txt"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
qpvuntsm 8934c772 [email protected] 2001-02-03 08:05:08 1: line1 | ||
zsuskuln 712ba14a [email protected] 2001-02-03 08:05:11 2: new text from new commit 1 | ||
royxmykx b0571bd9 [email protected] 2001-02-03 08:05:13 3: new text from new commit 2 | ||
"###); | ||
insta::assert_snapshot!(stdout, @r#" | ||
qpvuntsm 2001-02-03 08:05:08 8934c772 1: line1 | ||
zsuskuln 2001-02-03 08:05:11 712ba14a 2: new text from new commit 1 | ||
royxmykx 2001-02-03 08:05:13 b0571bd9 3: new text from new commit 2 | ||
"#); | ||
} | ||
|
||
#[test] | ||
|
@@ -102,15 +102,15 @@ fn test_annotate_conflicted() { | |
test_env.jj_cmd_ok(&repo_path, &["new"]); | ||
|
||
let stdout = test_env.jj_cmd_success(&repo_path, &["file", "annotate", "file.txt"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
qpvuntsm 8934c772 [email protected] 2001-02-03 08:05:08 1: line1 | ||
yostqsxw 7b90c9f6 [email protected] 2001-02-03 08:05:15 2: <<<<<<< Conflict 1 of 1 | ||
yostqsxw 7b90c9f6 [email protected] 2001-02-03 08:05:15 3: %%%%%%% Changes from base to side #1 | ||
yostqsxw 7b90c9f6 [email protected] 2001-02-03 08:05:15 4: +new text from new commit 1 | ||
yostqsxw 7b90c9f6 [email protected] 2001-02-03 08:05:15 5: +++++++ Contents of side #2 | ||
royxmykx b0571bd9 [email protected] 2001-02-03 08:05:13 6: new text from new commit 2 | ||
yostqsxw 7b90c9f6 [email protected] 2001-02-03 08:05:15 7: >>>>>>> Conflict 1 of 1 ends | ||
"###); | ||
insta::assert_snapshot!(stdout, @r##" | ||
qpvuntsm 2001-02-03 08:05:08 8934c772 1: line1 | ||
yostqsxw 2001-02-03 08:05:15 7b90c9f6 2: <<<<<<< Conflict 1 of 1 | ||
yostqsxw 2001-02-03 08:05:15 7b90c9f6 3: %%%%%%% Changes from base to side #1 | ||
yostqsxw 2001-02-03 08:05:15 7b90c9f6 4: +new text from new commit 1 | ||
yostqsxw 2001-02-03 08:05:15 7b90c9f6 5: +++++++ Contents of side #2 | ||
royxmykx 2001-02-03 08:05:13 b0571bd9 6: new text from new commit 2 | ||
yostqsxw 2001-02-03 08:05:15 7b90c9f6 7: >>>>>>> Conflict 1 of 1 ends | ||
"##); | ||
} | ||
|
||
#[test] | ||
|
@@ -141,8 +141,8 @@ fn test_annotate_merge_one_sided_conflict_resolution() { | |
.unwrap(); | ||
|
||
let stdout = test_env.jj_cmd_success(&repo_path, &["file", "annotate", "file.txt"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
qpvuntsm 8934c772 [email protected] 2001-02-03 08:05:08 1: line1 | ||
zsuskuln 712ba14a [email protected] 2001-02-03 08:05:11 2: new text from new commit 1 | ||
"###); | ||
insta::assert_snapshot!(stdout, @r#" | ||
qpvuntsm 2001-02-03 08:05:08 8934c772 1: line1 | ||
zsuskuln 2001-02-03 08:05:11 712ba14a 2: new text from new commit 1 | ||
"#); | ||
} |