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

Re: [PATCH 2/2] doc: diff-options.adoc: show format.noprefix for format-patch

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 19, 2026, 18:10 UTC
Message-ID
<xmqqtsvc61u6.fsf@gitster.g>
In-Reply-To
<format.noprefix_and_--default-prefix.39e@msgid.xyz>
kristofferhaugsbakk@fastmail.com writes:
Show 38 quoted lines
> From: Kristoffer Haugsbakk <code@khaugsbakk.name>
>
> git-format-patch(1) uses `format.noprefix` and ignores `diff.noprefix`.
>
> The configuration variable `format.prefix` was added as an “escape
> hatch” because “it’s unlikely that anybody really wants format.
> noprefix=true in the first place.”[1] Based on that there doesn’t
> seem to be a need to widely advertise this configuration variable.
>
> But in any case: the documentation for this option should not claim
> that it overrides a config that is always ignored.
>
> † 1: 8d5213de (format-patch: add format.noprefix option, 2023-03-09)
>
> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
> ---
>
> Notes (series):
>     `--default-prefix` does override `format.noprefix`. See test `format-patch
>     --default-prefix overrides format.noprefix`.
>
>  Documentation/diff-options.adoc | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/diff-options.adoc b/Documentation/diff-options.adoc
> index 9cdad6f72a0..8f632d5fe1a 100644
> --- a/Documentation/diff-options.adoc
> +++ b/Documentation/diff-options.adoc
> @@ -860,7 +860,9 @@ endif::git-format-patch[]
>  
>  `--default-prefix`::
>  	Use the default source and destination prefixes ("a/" and "b/").
> -	This overrides configuration variables such as `diff.noprefix`,
> +	This overrides configuration variables such as
> +ifndef::git-format-patch[`diff.noprefix`,]
> +ifdef::git-format-patch[`format.noprefix`,]
>  	`diff.srcPrefix`, `diff.dstPrefix`, and `diff.mnemonicPrefix`
>  	(see linkgit:git-config[1]).

The reasoning makes sense. The ifn?def::*[<something>] syntax is new to our documentation set, but we'll see soon enough how AsciiDoc and Asciidoctor renders them.

Queued.  Thanks.
Previous: kristofferhaugsbakk@fastmail.comNext: kristofferhaugsbakk@fastmail.com
Message 7 of 16 in “format-patch: make boolean and mention in diff-options.adoc”
  1. 0/2 format-patch: make boolean and mention in diff-options.adockristofferhaugsbakk@fastmail.com, Feb 18, 2026
  2. 1/2 format-patch: make format.noprefix a booleankristofferhaugsbakk@fastmail.com, Feb 18, 2026
  3. Junio C HamanoFeb 19, 2026
  4. Kristoffer HaugsbakkFeb 23, 2026
  5. Jeff KingFeb 20, 2026
  6. 2/2 doc: diff-options.adoc: show format.noprefix for format-patchkristofferhaugsbakk@fastmail.com, Feb 18, 2026
  7. Junio C HamanoFeb 19, 2026
  8. 0/2 format-patch: make boolean and mention in diff-options.adockristofferhaugsbakk@fastmail.com, Feb 23, 2026
  9. 1/2 format-patch: make format.noprefix a booleankristofferhaugsbakk@fastmail.com, Feb 23, 2026
  10. 2/2 doc: diff-options.adoc: show format.noprefix for format-patchkristofferhaugsbakk@fastmail.com, Feb 23, 2026
  11. Jean-Noël AvilaFeb 27, 2026
  12. Junio C HamanoFeb 27, 2026
  13. kristofferhaugsbakk@fastmail.comFeb 28, 2026
  14. Jean-Noël AVILAFeb 28, 2026
  15. doc: diff-options.adoc: make *.noprefix split translatablekristofferhaugsbakk@fastmail.com, Mar 1, 2026
  16. Junio C HamanoMar 2, 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.