mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-19 19:08:08 +00:00
cli: config: update default template for multi-line overridden values
This commit is contained in:
parent
ef8038f60f
commit
06f488a8f6
2 changed files with 21 additions and 7 deletions
|
@ -15,13 +15,9 @@ if(remote,
|
|||
commit_summary = 'format_commit_summary_with_refs(self, branches)'
|
||||
|
||||
config_list = '''
|
||||
label(if(overridden, "overridden"),
|
||||
concat(
|
||||
if(overridden, "# "),
|
||||
name,
|
||||
"=",
|
||||
value,
|
||||
),
|
||||
if(overridden,
|
||||
label("overridden", indent("# ", name ++ "=" ++ value)),
|
||||
name ++ "=" ++ value,
|
||||
) ++ "\n"
|
||||
'''
|
||||
|
||||
|
|
|
@ -156,6 +156,24 @@ bar
|
|||
bar
|
||||
"""
|
||||
"###);
|
||||
|
||||
let stdout = test_env.jj_cmd_success(
|
||||
test_env.env_root(),
|
||||
&[
|
||||
"config",
|
||||
"list",
|
||||
"multiline",
|
||||
"--include-overridden",
|
||||
"--config-toml=multiline='single'",
|
||||
],
|
||||
);
|
||||
insta::assert_snapshot!(stdout, @r###"
|
||||
# multiline="""
|
||||
# foo
|
||||
# bar
|
||||
# """
|
||||
multiline="single"
|
||||
"###);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue