ok/jj
1
0
Fork 0
forked from mirrors/jj

tests: restore effectiveness of prefix among hidden commits

When I added `revsets.short-prefixes` in 20ef171d7a, I didn't notice
that I made the test of commit prefixes among hidden commits
ineffective because. This restores that by disabling short prefixes in
the test.
This commit is contained in:
Martin von Zweigbergk 2023-05-21 20:27:03 -07:00 committed by Martin von Zweigbergk
parent a72898000f
commit 5d2872d76f

View file

@ -513,6 +513,8 @@ fn test_log_prefix_highlight_counts_hidden_commits() {
let repo_path = test_env.env_root().join("repo");
test_env.add_config(
r###"
[revsets]
short-prefixes = "" # Disable short prefixes
[template-aliases]
'format_id(id)' = 'id.shortest(12).prefix() ++ "[" ++ id.shortest(12).rest() ++ "]"'
"###,
@ -546,14 +548,14 @@ fn test_log_prefix_highlight_counts_hidden_commits() {
}
test_env.jj_cmd_success(&repo_path, &["abandon", "description(extra)"]);
// The first commit's unique prefix became longer.
// The unique prefixes became longer.
insta::assert_snapshot!(
test_env.jj_cmd_success(&repo_path, &["log", "-T", prefix_format]),
@r###"
@ Change w[qnwkozpkust] 4[44c3c5066d3]
Change q[pvuntsmwlqt] initial b[a1a30916d29] original
@ Change w[qnwkozpkust] 44[4c3c5066d3]
Change q[pvuntsmwlqt] initial ba[1a30916d29] original
Change z[zzzzzzzzzzz] 0[00000000000]
Change z[zzzzzzzzzzz] 00[0000000000]
"###
);
insta::assert_snapshot!(