🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.git
3 messages
3 total messages Started by Junio C Hamano Fri, 06 Nov 2026 16:39
Re: [PATCH v3 02/12] rerere: convert flags into an enum
#2519
Author: Junio C Hamano
Date: Fri, 06 Nov 2026 16:39
33 lines
13769 bytes
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.

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.

> +	/* Skip acquiring the MERGE_RR.lock for a read-only operation. */
> +	RERERE_READONLY = (1 << 2),
> +
> +	/* If MERGE_RR.lock is taken, return -1 as if rerere were disabled. */
> +	RERERE_NOWAIT = (1 << 3),
> +};
Re: [PATCH v3 02/12] rerere: convert flags into an enum
#2723
Author: Junio C Hamano
Date: Mon, 09 Nov 2026 15:40
14 lines
13209 bytes
Patrick Steinhardt <ps@pks.im> writes:

>> 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 :)

;-)
Re: [PATCH v3 02/12] rerere: convert flags into an enum
#2739
Author: Junio C Hamano
Date: Mon, 09 Nov 2026 19:13
31 lines
13915 bytes
Junio C Hamano <gitster@pobox.com> writes:

> Patrick Steinhardt <ps@pks.im> writes:
>
>>> 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 :)
>
> ;-)

The command line can give us not two (which could be represented
with a single bit) but three choices, (0) the command line has no
preference on --[no-]autoupdate and follow the configured default,
(1) --autoupdate, or (2) --no-autoupdate, and that is exactly why we
have these two independent-looking bits.

But two bits can express another combination (i.e., both bits on),
which probably is invalid.  The underlying OPT_UYN() calls
parse_opt_tertiary() which only chooses between 1 and 2 so we should
be safe on the setting side, but I offhand do not remember if we
detect when both bits are on and BUG() out where we consume the
value.

Thanks.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads