Re: [PATCH v3 02/12] rerere: convert flags into an enum
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Nov 9, 2026, 07:06 UTC
- Message-ID
- <avFxCywngxJgwylf@pks.im>
- In-Reply-To
- <xmqqqzgxlxrq.fsf@gitster.g>
On Fri, Nov 06, 2026 at 08:39:37AM -0800, Junio C Hamano wrote:
Show 20 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
>
> > +enum rerere_flags {
> > + /*
> > + * Auto-update the index with previously recorded resolutions. This can
> > + * be used to explicitly override "rerere.autoUpdate".
> > + */
> > + RERERE_AUTOUPDATE = (1 << 0),
> > +
> > + /*
> > + * Reverse of RERERE_AUTOUPDATE. That is, update the file in the
> > + * working tree but don't touch the index.
> > + */
> > + RERERE_NOAUTOUPDATE = (1 << 1),
>
> As you have updated the comment in this iteration, I'll throw a bit
> of review in. The new comment is not wrong per-se, but the one from
> the previous iteration was sufficient to convey the same thing. In
> other words, I see no improvement in v3 over what you had in v2 for
> this bit.I wouldn't necessarily say so, as an unknowing reader might not know that we still update the working tree. I myself certainly didn't, and I had to dig a bit to figure out what happens with this flag, mostly because I am not familiar with the rerere subsystem.
> What BOTH versions lack is an explanation why RERERE_NOAUTOUPDATE is > needed in the first place. In other words, "How is it different > from the lack of RERERE_AUTOUPDATE bit?" is not answered here. And > I think that is a lot more important thing to clarify.
Heh, in this case _I_ thought that it's implicitly clear from the comment of `RERERE_AUTOUPDATE`: it overrides "rerere.autoUpdate". I figured that updating these comments would cause some discussions, and that's exactly why I didn't dare to update them at all in v1 :)
How about this instead:
Only update the file in the working tree, but don't touch the index.
This can be passed to explicitly override "rerere.autoUpdate".Patrick