Re: [GSoC PATCH 1/2] repo: add the flag -z as an alias for --format=nul
From: Junio C Hamano <hidden>
Date: 2025-08-21 21:50:06
Lucas Seiki Oshiro [off-list ref] writes:
quoted
quoted
But I don't have any strong opinion about that. I'm open to suggestions.Don't ask for suggestions before consulting CodingGuidelines, perhaps?I think that Patrick was unsure about adding the external parentheses to make it look like [(--format=(keyvalue|nul) | -z)]. CodingGuideLines is not explicit about that specific case of having alternate flags with nested alternate arguments, but I don't see a reason for using parentheses as it isn't ambiguous...
Parentheses are used for grouping:
[(<rev>|<range>)...]
(Any number of either <rev> or <range>. Parens are needed to make
it clear that "..." pertains to both <rev> and <range>.)
[(-p <parent>)...]
(Any number of option -p, each with one <parent> argument.)
If we were saying that these things can occur multiple times, it may
benefit from such a grouping by doing
[(--format=(keyvalue|nul) | -z)...]
But the outer () without these extra things, i.e.
[(--format=(keyvalue|nul) | -z)]
does not look like serving any useful purpose at all to me...