Re: [PATCH v2] pretty: add %(decorate[:<options>]) format
Andy Koppe <andy.koppe@gmail.com> writes:
Show 27 quoted lines
> On 11/08/2023 21:38, Junio C Hamano wrote:
>> Andy Koppe <andy.koppe@gmail.com> writes:
>>
>>> There are a number of uses of designated initializers already, so
>>> hopefully compound literals aren't too much of an extra challenge.
>>
>> I do not see how one leads to the other here. I'd prefer not to see
>> use of a new construct we do not currently use mixed in a new code,
>> even if it is mentioned in the proposed log message.
>
> Okay.
>
> Would this style be acceptable to fulfil Glen's request to name the
> fields?
>
> case 'D':
> {
> const struct decoration_options opts = {
> .prefix = "",
> .suffix = ""
> };
>
> format_decorations(sb, commit, c->auto_color, &opts);
> }
> return 1;
>
> Andy