From: Jeff King <peff@peff•net>
To: Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail•com>
Cc: "Alejandro Colomar" <alx@kernel•org>,
git@vger•kernel.org, наб <nabijaczleweli@nabijaczleweli•xyz>,
linux-man@vger•kernel.org
Subject: Re: [PATCH v2] futex_waitv.2: new page
Date: Wed, 11 Feb 2026 02:35:53 -0500 [thread overview]
Message-ID: <20260211073553.GA1867915@coredump.intra.peff.net> (raw)
In-Reply-To: <55bd6ad3-cd19-4839-a808-eceae802d3c8@app.fastmail.com>
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().
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
next prev parent reply other threads:[~2026-02-11 7:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <jpyv367v4jdxfxebxw6wh7rgqdfeswzp44dzsycfjt5k2pxe4j@tarta.nabijaczleweli.xyz>
[not found] ` <se6hm5gnd7cyjsby5q6pctkrws5ecp5gpnfjuy3zh2shd2abyj@tarta.nabijaczleweli.xyz>
[not found] ` <aYpg1XelZBzpw4ZL@devuan>
[not found] ` <rqshygydxwpfs2mi5cwxl3wvztgctj3nvu3y5bpo5s32owucna@tarta.nabijaczleweli.xyz>
2026-02-10 14:30 ` [PATCH v2] futex_waitv.2: new page Alejandro Colomar
2026-02-10 15:54 ` Kristoffer Haugsbakk
2026-02-10 18:39 ` Alejandro Colomar
2026-02-11 7:35 ` Jeff King [this message]
2026-02-11 8:15 ` Kristoffer Haugsbakk
2026-02-11 15:43 ` Junio C Hamano
2026-02-10 16:54 ` Junio C Hamano
2026-02-10 17:11 ` Kristoffer Haugsbakk
2026-02-10 18:44 ` Alejandro Colomar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260211073553.GA1867915@coredump.intra.peff.net \
--to=peff@peff$(echo .)net \
--cc=alx@kernel$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
--cc=kristofferhaugsbakk@fastmail$(echo .)com \
--cc=linux-man@vger$(echo .)kernel.org \
--cc=nabijaczleweli@nabijaczleweli$(echo .)xyz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox