mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-19 19:08:08 +00:00
templates: align attributes in builtin_log_detailed
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
nix / flake check (push) Waiting to run
build / build (, macos-13) (push) Waiting to run
build / build (, macos-14) (push) Waiting to run
build / build (, ubuntu-latest) (push) Waiting to run
build / build (, windows-latest) (push) Waiting to run
build / build (--all-features, ubuntu-latest) (push) Waiting to run
build / Build jj-lib without Git support (push) Waiting to run
build / Check protos (push) Waiting to run
build / Check formatting (push) Waiting to run
build / Check that MkDocs can build the docs (push) Waiting to run
build / Check that MkDocs can build the docs with latest Python and uv (push) Waiting to run
build / cargo-deny (advisories) (push) Waiting to run
build / cargo-deny (bans licenses sources) (push) Waiting to run
build / Clippy check (push) Waiting to run
Codespell / Codespell (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-latest) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Some checks are pending
binaries / Build binary artifacts (push) Waiting to run
nix / flake check (push) Waiting to run
build / build (, macos-13) (push) Waiting to run
build / build (, macos-14) (push) Waiting to run
build / build (, ubuntu-latest) (push) Waiting to run
build / build (, windows-latest) (push) Waiting to run
build / build (--all-features, ubuntu-latest) (push) Waiting to run
build / Build jj-lib without Git support (push) Waiting to run
build / Check protos (push) Waiting to run
build / Check formatting (push) Waiting to run
build / Check that MkDocs can build the docs (push) Waiting to run
build / Check that MkDocs can build the docs with latest Python and uv (push) Waiting to run
build / cargo-deny (advisories) (push) Waiting to run
build / cargo-deny (bans licenses sources) (push) Waiting to run
build / Clippy check (push) Waiting to run
Codespell / Codespell (push) Waiting to run
website / prerelease-docs-build-deploy (ubuntu-latest) (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
Change-Id: Id00000003feb0508bf7f08e0a0275ba7f7695b70
This commit is contained in:
parent
6c72a3d1c1
commit
0794f87324
5 changed files with 67 additions and 68 deletions
|
@ -133,8 +133,8 @@ concat(
|
|||
"Commit ID: " ++ commit_id ++ "\n",
|
||||
"Change ID: " ++ change_id ++ "\n",
|
||||
surround("Bookmarks: ", "\n", separate(" ", local_bookmarks, remote_bookmarks)),
|
||||
surround("Tags: ", "\n", tags),
|
||||
"Author: " ++ format_detailed_signature(author) ++ "\n",
|
||||
surround("Tags : ", "\n", tags),
|
||||
"Author : " ++ format_detailed_signature(author) ++ "\n",
|
||||
"Committer: " ++ format_detailed_signature(committer) ++ "\n",
|
||||
"\n",
|
||||
indent(" ",
|
||||
|
|
|
@ -142,10 +142,10 @@ fn test_backout_multiple() {
|
|||
"###);
|
||||
// View the output of each backed out commit
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "@+"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Commit ID: 8ff3fbc2ccb0d66985f558c461d1643cebb4c7d6
|
||||
Change ID: wqnwkozpkustnxypnnntnykwrqrkrpvv
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:19)
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:19)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:19)
|
||||
|
||||
Back out "e"
|
||||
|
@ -156,12 +156,12 @@ fn test_backout_multiple() {
|
|||
1 1: a
|
||||
2 2: b
|
||||
3 : c
|
||||
"###);
|
||||
"#);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "@++"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Commit ID: d31d42e0267f6524d445348b1dd00926c62a6b57
|
||||
Change ID: mouksmquosnpvwqrpsvvxtxpywpnxlss
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:19)
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:19)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:19)
|
||||
|
||||
Back out "c"
|
||||
|
@ -170,12 +170,12 @@ fn test_backout_multiple() {
|
|||
|
||||
Removed regular file b:
|
||||
1 : b
|
||||
"###);
|
||||
"#);
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "@+++"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Commit ID: 6504c4ded177fba2334f76683d1aa643700d5073
|
||||
Change ID: tqvpomtpwrqsylrpsxknultrymmqxmxv
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:19)
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:19)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:19)
|
||||
|
||||
Back out "b"
|
||||
|
@ -185,7 +185,7 @@ fn test_backout_multiple() {
|
|||
Modified regular file a:
|
||||
1 1: a
|
||||
2 : b
|
||||
"###);
|
||||
"#);
|
||||
}
|
||||
|
||||
fn get_log_output(test_env: &TestEnvironment, cwd: &Path) -> String {
|
||||
|
|
|
@ -316,31 +316,31 @@ fn test_log_builtin_templates() {
|
|||
[EOF]
|
||||
"###);
|
||||
|
||||
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###"
|
||||
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r#"
|
||||
Commit ID: dc31539712c7294d1d712cec63cef4504b94ca74
|
||||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp
|
||||
Bookmarks: my-bookmark
|
||||
Author: (no name set) <(no email set)> (2001-02-03 08:05:08)
|
||||
Author : (no name set) <(no email set)> (2001-02-03 08:05:08)
|
||||
Committer: (no name set) <(no email set)> (2001-02-03 08:05:08)
|
||||
|
||||
(no description set)
|
||||
|
||||
Commit ID: 230dd059e1b059aefc0da06a2e5a7dbf22362f22
|
||||
Change ID: qpvuntsmwlqtpsluzzsnyyzlmlwvmlnu
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:07)
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:07)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:07)
|
||||
|
||||
(no description set)
|
||||
|
||||
Commit ID: 0000000000000000000000000000000000000000
|
||||
Change ID: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
|
||||
Author: (no name set) <(no email set)> (1970-01-01 11:00:00)
|
||||
Author : (no name set) <(no email set)> (1970-01-01 11:00:00)
|
||||
Committer: (no name set) <(no email set)> (1970-01-01 11:00:00)
|
||||
|
||||
(no description set)
|
||||
|
||||
[EOF]
|
||||
"###);
|
||||
"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -386,30 +386,29 @@ fn test_log_builtin_templates_colored() {
|
|||
|
||||
"#);
|
||||
|
||||
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###"
|
||||
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r#"
|
||||
[1m[38;5;2m@[0m Commit ID: [38;5;4mdc31539712c7294d1d712cec63cef4504b94ca74[39m
|
||||
│ Change ID: [38;5;5mrlvkpnrzqnoowoytxnquwvuryrwnrmlp[39m
|
||||
│ Bookmarks: [38;5;5mmy-bookmark[39m
|
||||
│ Author: [38;5;1m(no name set)[39m <[38;5;1m(no email set)[39m> ([38;5;6m2001-02-03 08:05:08[39m)
|
||||
│ Author : [38;5;1m(no name set)[39m <[38;5;1m(no email set)[39m> ([38;5;6m2001-02-03 08:05:08[39m)
|
||||
│ Committer: [38;5;1m(no name set)[39m <[38;5;1m(no email set)[39m> ([38;5;6m2001-02-03 08:05:08[39m)
|
||||
│
|
||||
│ [38;5;2m (no description set)[39m
|
||||
│
|
||||
○ Commit ID: [38;5;4m230dd059e1b059aefc0da06a2e5a7dbf22362f22[39m
|
||||
│ Change ID: [38;5;5mqpvuntsmwlqtpsluzzsnyyzlmlwvmlnu[39m
|
||||
│ Author: [38;5;3mTest User[39m <[38;5;3mtest.user@example.com[39m> ([38;5;6m2001-02-03 08:05:07[39m)
|
||||
│ Author : [38;5;3mTest User[39m <[38;5;3mtest.user@example.com[39m> ([38;5;6m2001-02-03 08:05:07[39m)
|
||||
│ Committer: [38;5;3mTest User[39m <[38;5;3mtest.user@example.com[39m> ([38;5;6m2001-02-03 08:05:07[39m)
|
||||
│
|
||||
│ [38;5;2m (no description set)[39m
|
||||
│
|
||||
[1m[38;5;14m◆[0m Commit ID: [38;5;4m0000000000000000000000000000000000000000[39m
|
||||
Change ID: [38;5;5mzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz[39m
|
||||
Author: [38;5;1m(no name set)[39m <[38;5;1m(no email set)[39m> ([38;5;6m1970-01-01 11:00:00[39m)
|
||||
Author : [38;5;1m(no name set)[39m <[38;5;1m(no email set)[39m> ([38;5;6m1970-01-01 11:00:00[39m)
|
||||
Committer: [38;5;1m(no name set)[39m <[38;5;1m(no email set)[39m> ([38;5;6m1970-01-01 11:00:00[39m)
|
||||
|
||||
[38;5;2m (no description set)[39m
|
||||
|
||||
"###);
|
||||
"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -455,30 +454,30 @@ fn test_log_builtin_templates_colored_debug() {
|
|||
<<log::>>
|
||||
"#);
|
||||
|
||||
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###"
|
||||
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r#"
|
||||
[1m[38;5;2m<<node working_copy::@>>[0m <<log::Commit ID: >>[38;5;4m<<log commit_id::dc31539712c7294d1d712cec63cef4504b94ca74>>[39m<<log::>>
|
||||
│ <<log::Change ID: >>[38;5;5m<<log change_id::rlvkpnrzqnoowoytxnquwvuryrwnrmlp>>[39m<<log::>>
|
||||
│ <<log::Bookmarks: >>[38;5;5m<<log local_bookmarks name::my-bookmark>>[39m<<log::>>
|
||||
│ <<log::Author: >>[38;5;1m<<log name placeholder::(no name set)>>[39m<<log:: <>>[38;5;1m<<log email placeholder::(no email set)>>[39m<<log::> (>>[38;5;6m<<log author timestamp local format::2001-02-03 08:05:08>>[39m<<log::)>>
|
||||
│ <<log::Author : >>[38;5;1m<<log name placeholder::(no name set)>>[39m<<log:: <>>[38;5;1m<<log email placeholder::(no email set)>>[39m<<log::> (>>[38;5;6m<<log author timestamp local format::2001-02-03 08:05:08>>[39m<<log::)>>
|
||||
│ <<log::Committer: >>[38;5;1m<<log name placeholder::(no name set)>>[39m<<log:: <>>[38;5;1m<<log email placeholder::(no email set)>>[39m<<log::> (>>[38;5;6m<<log committer timestamp local format::2001-02-03 08:05:08>>[39m<<log::)>>
|
||||
│ <<log::>>
|
||||
│ [38;5;2m<<log empty description placeholder:: (no description set)>>[39m<<log::>>
|
||||
│ <<log::>>
|
||||
<<node::○>> <<log::Commit ID: >>[38;5;4m<<log commit_id::230dd059e1b059aefc0da06a2e5a7dbf22362f22>>[39m<<log::>>
|
||||
│ <<log::Change ID: >>[38;5;5m<<log change_id::qpvuntsmwlqtpsluzzsnyyzlmlwvmlnu>>[39m<<log::>>
|
||||
│ <<log::Author: >>[38;5;3m<<log author name::Test User>>[39m<<log:: <>>[38;5;3m<<log author email::test.user@example.com>>[39m<<log::> (>>[38;5;6m<<log author timestamp local format::2001-02-03 08:05:07>>[39m<<log::)>>
|
||||
│ <<log::Author : >>[38;5;3m<<log author name::Test User>>[39m<<log:: <>>[38;5;3m<<log author email::test.user@example.com>>[39m<<log::> (>>[38;5;6m<<log author timestamp local format::2001-02-03 08:05:07>>[39m<<log::)>>
|
||||
│ <<log::Committer: >>[38;5;3m<<log committer name::Test User>>[39m<<log:: <>>[38;5;3m<<log committer email::test.user@example.com>>[39m<<log::> (>>[38;5;6m<<log committer timestamp local format::2001-02-03 08:05:07>>[39m<<log::)>>
|
||||
│ <<log::>>
|
||||
│ [38;5;2m<<log empty description placeholder:: (no description set)>>[39m<<log::>>
|
||||
│ <<log::>>
|
||||
[1m[38;5;14m<<node immutable::◆>>[0m <<log::Commit ID: >>[38;5;4m<<log commit_id::0000000000000000000000000000000000000000>>[39m<<log::>>
|
||||
<<log::Change ID: >>[38;5;5m<<log change_id::zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz>>[39m<<log::>>
|
||||
<<log::Author: >>[38;5;1m<<log name placeholder::(no name set)>>[39m<<log:: <>>[38;5;1m<<log email placeholder::(no email set)>>[39m<<log::> (>>[38;5;6m<<log author timestamp local format::1970-01-01 11:00:00>>[39m<<log::)>>
|
||||
<<log::Author : >>[38;5;1m<<log name placeholder::(no name set)>>[39m<<log:: <>>[38;5;1m<<log email placeholder::(no email set)>>[39m<<log::> (>>[38;5;6m<<log author timestamp local format::1970-01-01 11:00:00>>[39m<<log::)>>
|
||||
<<log::Committer: >>[38;5;1m<<log name placeholder::(no name set)>>[39m<<log:: <>>[38;5;1m<<log email placeholder::(no email set)>>[39m<<log::> (>>[38;5;6m<<log committer timestamp local format::1970-01-01 11:00:00>>[39m<<log::)>>
|
||||
<<log::>>
|
||||
[38;5;2m<<log empty description placeholder:: (no description set)>>[39m<<log::>>
|
||||
<<log::>>
|
||||
"###);
|
||||
"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -2086,10 +2086,10 @@ fn test_diff_external_tool() {
|
|||
"###);
|
||||
|
||||
insta::assert_snapshot!(
|
||||
test_env.jj_cmd_success(&repo_path, &["show", "--tool=fake-diff-editor"]), @r###"
|
||||
test_env.jj_cmd_success(&repo_path, &["show", "--tool=fake-diff-editor"]), @r#"
|
||||
Commit ID: 39d9055d70873099fd924b9af218289d5663eac8
|
||||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
|
||||
(no description set)
|
||||
|
@ -2099,7 +2099,7 @@ fn test_diff_external_tool() {
|
|||
--
|
||||
file2
|
||||
file3
|
||||
"###);
|
||||
"#);
|
||||
|
||||
// Enabled by default, looks up the merge-tools table
|
||||
let config = "--config-toml=ui.diff.tool='fake-diff-editor'";
|
||||
|
@ -2133,16 +2133,16 @@ fn test_diff_external_tool() {
|
|||
// Non-zero exit code isn't an error
|
||||
std::fs::write(&edit_script, "print diff\0fail").unwrap();
|
||||
let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["show", "--tool=fake-diff-editor"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Commit ID: 39d9055d70873099fd924b9af218289d5663eac8
|
||||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
|
||||
(no description set)
|
||||
|
||||
diff
|
||||
"###);
|
||||
"#);
|
||||
insta::assert_snapshot!(stderr.replace("exit code:", "exit status:"), @r###"
|
||||
Warning: Tool exited with exit status: 1 (run with --debug to see the exact invocation)
|
||||
"###);
|
||||
|
@ -2237,10 +2237,10 @@ fn test_diff_external_file_by_file_tool() {
|
|||
"###);
|
||||
|
||||
insta::assert_snapshot!(
|
||||
test_env.jj_cmd_success(&repo_path, &["show", config]), @r###"
|
||||
test_env.jj_cmd_success(&repo_path, &["show", config]), @r#"
|
||||
Commit ID: 7b01704a670bc77d11ed117d362855cff1d4513b
|
||||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
|
||||
(no description set)
|
||||
|
@ -2257,7 +2257,7 @@ fn test_diff_external_file_by_file_tool() {
|
|||
file1
|
||||
--
|
||||
file4
|
||||
"###);
|
||||
"#);
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
|
|
|
@ -26,12 +26,12 @@ fn test_show() {
|
|||
let stdout = test_env.jj_cmd_success(&repo_path, &["show"]);
|
||||
let stdout = stdout.lines().skip(2).join("\n");
|
||||
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:07)
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:07)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:07)
|
||||
|
||||
(no description set)
|
||||
"###);
|
||||
"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -48,10 +48,10 @@ fn test_show_basic() {
|
|||
std::fs::write(repo_path.join("file3"), "foo\n").unwrap();
|
||||
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["show"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f
|
||||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
|
||||
(no description set)
|
||||
|
@ -61,13 +61,13 @@ fn test_show_basic() {
|
|||
2: bar
|
||||
2 3: baz quxquux
|
||||
Modified regular file file3 (file1 => file3):
|
||||
"###);
|
||||
"#);
|
||||
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--context=0"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f
|
||||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
|
||||
(no description set)
|
||||
|
@ -77,13 +77,13 @@ fn test_show_basic() {
|
|||
2: bar
|
||||
2 3: baz quxquux
|
||||
Modified regular file file3 (file1 => file3):
|
||||
"###);
|
||||
"#);
|
||||
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--color=debug"]);
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Commit ID: [38;5;4m<<commit_id::e34f04317a81edc6ba41fef239c0d0180f10656f>>[39m
|
||||
Change ID: [38;5;5m<<change_id::rlvkpnrzqnoowoytxnquwvuryrwnrmlp>>[39m
|
||||
Author: [38;5;3m<<author name::Test User>>[39m <[38;5;3m<<author email::test.user@example.com>>[39m> ([38;5;6m<<author timestamp local format::2001-02-03 08:05:09>>[39m)
|
||||
Author : [38;5;3m<<author name::Test User>>[39m <[38;5;3m<<author email::test.user@example.com>>[39m> ([38;5;6m<<author timestamp local format::2001-02-03 08:05:09>>[39m)
|
||||
Committer: [38;5;3m<<committer name::Test User>>[39m <[38;5;3m<<committer email::test.user@example.com>>[39m> ([38;5;6m<<committer timestamp local format::2001-02-03 08:05:09>>[39m)
|
||||
|
||||
[38;5;3m<<description placeholder:: (no description set)>>[39m
|
||||
|
@ -96,36 +96,36 @@ fn test_show_basic() {
|
|||
"#);
|
||||
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "-s"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f
|
||||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
|
||||
(no description set)
|
||||
|
||||
M file2
|
||||
R {file1 => file3}
|
||||
"###);
|
||||
"#);
|
||||
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--types"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f
|
||||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
|
||||
(no description set)
|
||||
|
||||
FF file2
|
||||
FF {file1 => file3}
|
||||
"###);
|
||||
"#);
|
||||
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--git"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f
|
||||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
|
||||
(no description set)
|
||||
|
@ -142,13 +142,13 @@ fn test_show_basic() {
|
|||
diff --git a/file1 b/file3
|
||||
rename from file1
|
||||
rename to file3
|
||||
"###);
|
||||
"#);
|
||||
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--git", "--context=0"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f
|
||||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
|
||||
(no description set)
|
||||
|
@ -164,13 +164,13 @@ fn test_show_basic() {
|
|||
diff --git a/file1 b/file3
|
||||
rename from file1
|
||||
rename to file3
|
||||
"###);
|
||||
"#);
|
||||
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--git", "--color=debug"]);
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Commit ID: [38;5;4m<<commit_id::e34f04317a81edc6ba41fef239c0d0180f10656f>>[39m
|
||||
Change ID: [38;5;5m<<change_id::rlvkpnrzqnoowoytxnquwvuryrwnrmlp>>[39m
|
||||
Author: [38;5;3m<<author name::Test User>>[39m <[38;5;3m<<author email::test.user@example.com>>[39m> ([38;5;6m<<author timestamp local format::2001-02-03 08:05:09>>[39m)
|
||||
Author : [38;5;3m<<author name::Test User>>[39m <[38;5;3m<<author email::test.user@example.com>>[39m> ([38;5;6m<<author timestamp local format::2001-02-03 08:05:09>>[39m)
|
||||
Committer: [38;5;3m<<committer name::Test User>>[39m <[38;5;3m<<committer email::test.user@example.com>>[39m> ([38;5;6m<<committer timestamp local format::2001-02-03 08:05:09>>[39m)
|
||||
|
||||
[38;5;3m<<description placeholder:: (no description set)>>[39m
|
||||
|
@ -190,10 +190,10 @@ fn test_show_basic() {
|
|||
"#);
|
||||
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "-s", "--git"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f
|
||||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
|
||||
(no description set)
|
||||
|
@ -212,13 +212,13 @@ fn test_show_basic() {
|
|||
diff --git a/file1 b/file3
|
||||
rename from file1
|
||||
rename to file3
|
||||
"###);
|
||||
"#);
|
||||
|
||||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "--stat"]);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Commit ID: e34f04317a81edc6ba41fef239c0d0180f10656f
|
||||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp
|
||||
Author: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Author : Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
Committer: Test User <test.user@example.com> (2001-02-03 08:05:09)
|
||||
|
||||
(no description set)
|
||||
|
@ -226,7 +226,7 @@ fn test_show_basic() {
|
|||
file2 | 3 ++-
|
||||
{file1 => file3} | 0
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
"###);
|
||||
"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -294,10 +294,10 @@ fn test_show_relative_timestamps() {
|
|||
.map(|x| timestamp_re.replace_all(x, "(...timestamp...)"))
|
||||
.join("\n");
|
||||
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
Author: Test User <test.user@example.com> (...timestamp...)
|
||||
insta::assert_snapshot!(stdout, @r#"
|
||||
Author : Test User <test.user@example.com> (...timestamp...)
|
||||
Committer: Test User <test.user@example.com> (...timestamp...)
|
||||
|
||||
(no description set)
|
||||
"###);
|
||||
"#);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue