Re: [PATCH v2 02/12] rerere: convert flags into an enum
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Nov 6, 2026, 11:39 UTC
- Message-ID
- <au28e2L4LEMziCfI@pks.im>
- In-Reply-To
- <CAOLa=ZT6XJK_duCu5E+i-PxXzaCt-JUOsHAsTdysc7EYY3pBdg@mail.gmail.com>
On Fri, Nov 06, 2026 at 05:51:13AM -0500, Karthik Nayak wrote:
Show 24 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
>
> > diff --git a/rerere.h b/rerere.h
> > index dd9da03d6db..f13790c5dcd 100644
> > --- a/rerere.h
> > +++ b/rerere.h
> > @@ -39,10 +33,27 @@ struct rerere_id {
> > int variant;
> > };
> >
> > +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. */
> > + RERERE_NOAUTOUPDATE = (1 << 1),
> > +
>
> Nit: From my understanding, RERERE_NOAUTOUPDATE outputs the conflict
> resolution information to the stderr instead of updating the index.
> Perhaps that's something to document?Well, the fact that it prints to stderr is not specific to NOAUTOUPDATE. We print messages in both cases, just at different times:
- When `RERERE_AUTOUPDATE` is set we print the messages in
`update_paths()`. - When `RERERE_NOAUTOUPDATE` is set (or `RERERE_AUTOUPDATE` is simply
unset) then we print the message in `do_rerere_one_path()`.The messages are different of course, but I don't really think that this matters for the flag here. What we might want to say though is that we don't update the index, but the working tree does get updated.
Will adapt, thanks.
Patrick