mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-15 08:53:16 +00:00
templates: colorize description_placeholder
Also, see https://github.com/martinvonz/jj/pull/2100.
This commit is contained in:
parent
38c362bd53
commit
89b7b0bfe8
3 changed files with 9 additions and 4 deletions
|
@ -32,6 +32,8 @@
|
|||
"divergent change_id"="red"
|
||||
"conflict" = "red"
|
||||
"empty" = "green"
|
||||
"description placeholder" = "yellow"
|
||||
"empty description placeholder" = "green"
|
||||
"separator" = "bright black"
|
||||
"root" = "green"
|
||||
|
||||
|
@ -51,6 +53,8 @@
|
|||
"working_copy divergent change_id" = "bright red"
|
||||
"working_copy conflict" = "bright red"
|
||||
"working_copy empty" = "bright green"
|
||||
"working_copy description placeholder" = "yellow"
|
||||
"working_copy empty description placeholder" = "bright green"
|
||||
"diff header" = "yellow"
|
||||
"diff empty" = "cyan"
|
||||
"diff file_header" = { bold = true }
|
||||
|
|
|
@ -121,7 +121,8 @@ separate(" ",
|
|||
)
|
||||
'''
|
||||
|
||||
description_placeholder = 'label("description placeholder", "(no description set)")'
|
||||
description_placeholder = '''
|
||||
label(if(empty, "empty ") ++ "description placeholder", "(no description set)")'''
|
||||
commit_summary_separator = 'label("separator", " | ")'
|
||||
|
||||
# Hook points for users to customize the default templates:
|
||||
|
|
|
@ -266,9 +266,9 @@ fn test_log_obslog_divergence() {
|
|||
@ [1m[4m[38;5;1mq[24mpvuntsm[38;5;9m??[39m [38;5;3mtest.user@example.com[39m [38;5;14m2001-02-03 04:05:08.000 +07:00[39m [38;5;12m7[38;5;8ma17d52e[39m[0m
|
||||
│ [1mdescription 1[0m
|
||||
◉ [1m[24m[39mq[0m[38;5;8mpvuntsm[1m[39m?? hidden[0m [38;5;3mtest.user@example.com[39m [38;5;6m2001-02-03 04:05:08.000 +07:00[39m [1m[38;5;4m3[0m[38;5;8mb68ce25[39m
|
||||
│ (no description set)
|
||||
│ [38;5;3m(no description set)[39m
|
||||
◉ [1m[24m[39mq[0m[38;5;8mpvuntsm[1m[39m?? hidden[0m [38;5;3mtest.user@example.com[39m [38;5;6m2001-02-03 04:05:07.000 +07:00[39m [1m[38;5;4m2[0m[38;5;8m30dd059[39m
|
||||
[38;5;2m(empty)[39m (no description set)
|
||||
[38;5;2m(empty)[39m [38;5;2m(no description set)[39m
|
||||
"###);
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,7 @@ fn test_log_git_head() {
|
|||
@ [1m[38;5;13mr[38;5;8mlvkpnrz[39m [38;5;3mtest.user@example.com[39m [38;5;14m2001-02-03 04:05:09.000 +07:00[39m [38;5;12m5[38;5;8m0aaf475[39m[0m
|
||||
│ [1minitial[0m
|
||||
◉ [1m[38;5;5mq[0m[38;5;8mpvuntsm[39m [38;5;3mtest.user@example.com[39m [38;5;6m2001-02-03 04:05:07.000 +07:00[39m [38;5;5mmaster[39m [38;5;2mHEAD@git[39m [1m[38;5;4m2[0m[38;5;8m30dd059[39m
|
||||
│ [38;5;2m(empty)[39m (no description set)
|
||||
│ [38;5;2m(empty)[39m [38;5;2m(no description set)[39m
|
||||
◉ [1m[38;5;5mz[0m[38;5;8mzzzzzzz[39m [38;5;2mroot[39m [1m[38;5;4m0[0m[38;5;8m0000000[39m
|
||||
"###);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue