diff options
author | Andy Koppe <andy.koppe@gmail.com> | 2023-10-08 23:23:07 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-10-09 21:25:13 +0300 |
commit | 2b09d16abac5c0cf389098a58f113f2053357dee (patch) | |
tree | 6c8a28f42e2dac4980c8dcfe122acf277d98b3a0 /t/t4205-log-pretty-formats.sh | |
parent | 1e63b34a449afd650b02ab19501e8ccf0c15816e (diff) |
pretty: fix ref filtering for %(decorate) formats
Mark pretty formats containing "%(decorate" as requiring decoration in
userformat_find_requirements(), same as "%d" and "%D".
Without this, cmd_log_init_finish() didn't invoke load_ref_decorations()
with the decoration_filter it puts together, and hence filtering options
such as --decorate-refs were quietly ignored.
Amend one of the %(decorate) checks in t4205-log-pretty-formats.sh to
test this.
Signed-off-by: Andy Koppe <andy.koppe@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4205-log-pretty-formats.sh')
-rwxr-xr-x | t/t4205-log-pretty-formats.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh index 16626e4fe9..5aabc9f7d8 100755 --- a/t/t4205-log-pretty-formats.sh +++ b/t/t4205-log-pretty-formats.sh @@ -590,9 +590,9 @@ test_expect_success 'pretty format %decorate' ' git log --format="%(decorate:prefix=,suffix=)" -1 >actual2 && test_cmp expect2 actual2 && - echo "[ HEAD -> foo; tag: bar; qux ]" >expect3 && - git log --format="%(decorate:prefix=[ ,suffix= ],separator=%x3B )" \ - -1 >actual3 && + echo "[ bar; qux; foo ]" >expect3 && + git log --format="%(decorate:prefix=[ ,suffix= ],separator=%x3B ,tag=)" \ + --decorate-refs=refs/ -1 >actual3 && test_cmp expect3 actual3 && # Try with a typo (in "separator"), in which case the placeholder should |