From 520b4db919eee208dc524e943a2ec8d26f2ff87a Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Fri, 26 Apr 2024 20:49:58 +0900 Subject: [PATCH] cli: colorize tag name in "tag list" output "working_copy tag" wouldn't be needed, but is added for consistency. --- cli/src/config/colors.toml | 2 ++ cli/tests/test_tag_command.rs | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/cli/src/config/colors.toml b/cli/src/config/colors.toml index 635a66f6d..4d95523c3 100644 --- a/cli/src/config/colors.toml +++ b/cli/src/config/colors.toml @@ -29,6 +29,7 @@ "branches" = "magenta" "local_branches" = "magenta" "remote_branches" = "magenta" +"tag" = "magenta" "tags" = "magenta" "git_refs" = "green" "git_head" = "green" @@ -55,6 +56,7 @@ "working_copy branches" = "bright magenta" "working_copy local_branches" = "bright magenta" "working_copy remote_branches" = "bright magenta" +"working_copy tag" = "bright magenta" "working_copy tags" = "bright magenta" "working_copy git_refs" = "bright green" "working_copy divergent" = "bright red" diff --git a/cli/tests/test_tag_command.rs b/cli/tests/test_tag_command.rs index 03ba26884..b50de037e 100644 --- a/cli/tests/test_tag_command.rs +++ b/cli/tests/test_tag_command.rs @@ -48,6 +48,13 @@ fn test_tag_list() { test_tag2 "###); + insta::assert_snapshot!( + test_env.jj_cmd_success(&repo_path, &["tag", "list", "--color=always"]), + @r###" + test_tag + test_tag2 + "###); + // Test pattern matching. insta::assert_snapshot!( test_env.jj_cmd_success(&repo_path, &["tag", "list", "test_tag2"]),