]> git.ipfire.org Git - thirdparty/git.git/commit - pretty.c
decorate: refactor format_decorations()
authorAndy Koppe <andy.koppe@gmail.com>
Sun, 20 Aug 2023 18:50:04 +0000 (19:50 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 21 Aug 2023 18:40:09 +0000 (11:40 -0700)
commita3883a6532163f0a53a7b202f32bf8fe565af056
treeeba20122b493f942aeff9bb9b12fbcf44bb7cbbe
parent31a922f8383ea75b5757d2f9d0615c85b2083b5a
decorate: refactor format_decorations()

Rename the format_decorations_extended function to format_decorations
and drop the format_decorations wrapper macro. Pass the prefix, suffix
and separator strings as a single 'struct format_decorations' pointer
argument instead of separate arguments. Use default values defined in
the function when either the struct pointer or any of the struct fields
are NULL. This is to ease extension with additional options.

Signed-off-by: Andy Koppe <andy.koppe@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
log-tree.c
log-tree.h
pretty.c