Re: [PATCH v2] futex_waitv.2: new page
Jeff King <peff@peff.net> writes:
Show 16 quoted lines
> On Tue, Feb 10, 2026 at 04:54:02PM +0100, Kristoffer Haugsbakk wrote:
>
>> An aside but `format.noprefix` is not a boolean like `diff.noprefix`.
>> It will be enabled with any value.
>
> Huh, that's weird. Indeed, the code is:
>
> if (!strcmp(var, "format.noprefix")) {
> format_no_prefix = 1;
> return 0;
> }
>
> which seems just wrong. I cannot think of any other case where the
> _existence_ of a config variable determines the outcome, rather than the
> assigned value. So I would be inclined to call this a bug and switch it
> to use git_config_bool().Very true. It is surprising that nobody noticed it during the review.
Show 25 quoted lines
> Technically that is not backwards-compatible, but I really think the
> existing behavior is just a bug. It was not something intended and is
> contrary to how the rest of Git works. Presumably nobody noticed because
> why in the world would you set it to false in the first place?
>
>> Is it standard to indicate this with the existing “If set,”, perhaps? Or
>> should it say “enabled with any value”?
>>
>> (+Cc Peff)
>>
>> format.noprefix::
>> If set, do not show any source or destination prefix in patches.
>> This is equivalent to the `diff.noprefix` option used by `git
>> diff` (but which is not respected by `format-patch`). Note that
>> by setting this, the receiver of any patches you generate will
>> have to apply them using the `-p0` option.
>
> We usually use "if set" in the config documentation to refer to options
> being set to the true value. So I think the documentation text is OK and
> would match the code, once fixed.
>
> Kristoffer, do you want to produce a patch to fix the code? I feel like
> finding it was 99% of the work. ;)
>
> -Peff