Thread (1 message) 1 message, 1 author, 2026-02-19

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

From: Junio C Hamano <hidden>
Date: 2026-02-19 18:11:00

kristofferhaugsbakk@fastmail.com writes:
quoted hunk
From: Kristoffer Haugsbakk <redacted>

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 <redacted>
---

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help