]> git.ipfire.org Git - thirdparty/git.git/commit
pretty: fix ref filtering for %(decorate) formats
authorAndy Koppe <andy.koppe@gmail.com>
Sun, 8 Oct 2023 20:23:07 +0000 (21:23 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Oct 2023 18:25:13 +0000 (11:25 -0700)
commit2b09d16abac5c0cf389098a58f113f2053357dee
tree6c8a28f42e2dac4980c8dcfe122acf277d98b3a0
parent1e63b34a449afd650b02ab19501e8ccf0c15816e
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>
pretty.c
t/t4205-log-pretty-formats.sh