Re: [PATCH v2] pretty: add %(decorate[:<options>]) format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andy Koppe <andy.koppe@xxxxxxxxx> writes:

> On 11/08/2023 21:38, Junio C Hamano wrote:
>> Andy Koppe <andy.koppe@xxxxxxxxx> 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

Sounds good to me.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux