git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] futex_waitv.2: new page

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 11, 2026, 15:43 UTC
Message-ID
<xmqqecmrwais.fsf@gitster.g>
In-Reply-To
<20260211073553.GA1867915@coredump.intra.peff.net>
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
Previous: Kristoffer HaugsbakkNext: Junio C Hamano
Message 6 of 9 in “Re: [PATCH v2] futex_waitv.2: new page”
  1. Alejandro ColomarFeb 10, 2026
  2. Kristoffer HaugsbakkFeb 10, 2026
  3. Alejandro ColomarFeb 10, 2026
  4. Jeff KingFeb 11, 2026
  5. Kristoffer HaugsbakkFeb 11, 2026
  6. Junio C HamanoFeb 11, 2026
  7. Junio C HamanoFeb 10, 2026
  8. Kristoffer HaugsbakkFeb 10, 2026
  9. Alejandro ColomarFeb 10, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.