Re: [PATCH] MIDX: revert the default version to v1
On Thu, Apr 16, 2026 at 07:24:55PM -0400, Jeff King wrote:
Show 15 quoted lines
> > Just a sytle thing but I'd prefer to see this written like this:
> >
> > + ctx.version = ((opts->flags & MIDX_WRITE_COMPACT)
> > + ? MIDX_VERSION_V2
> > + : MIDX_VERSION_V1);
> >
> > because you do not have to worry about the precedence between & and
> > ?: with an extra (parentheses), and a ternary split into multiple
> > lines is easier to spot if you write it at the beginning of the
> > line, with ? and : aligned.
>
> OK. I like the "?" at the end of the first line, since it makes it clear
> from just that line that it is a conditional and not a direct
> assignment. But I don't overly care, and if you want to mark it up as
> you apply (if it is not already too late), I am fine with that.
Ah, I just fetched next and saw that you did so already. Good. :)
-Peff