From 5eee5d81e42369e7e3b86dbc6f45e96c65c0bb1d Mon Sep 17 00:00:00 2001 From: Kristoffer Haugsbakk Date: Tue, 24 Feb 2026 00:30:51 +0100 Subject: doc: diff-options.adoc: show format.noprefix for format-patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-format-patch(1) uses `format.noprefix` and ignores `diff.noprefix`. The configuration variable `format.prefix` was added as an “escape hatch”, and “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 Signed-off-by: Junio C Hamano --- Documentation/diff-options.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Documentation/diff-options.adoc') diff --git a/Documentation/diff-options.adoc b/Documentation/diff-options.adoc index 9cdad6f72a..8f632d5fe1 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]). -- cgit v1.3 From ea3a62c40ef2d31a6ab87ae3b8be46690d549b58 Mon Sep 17 00:00:00 2001 From: Kristoffer Haugsbakk Date: Sun, 1 Mar 2026 20:21:14 +0100 Subject: doc: diff-options.adoc: make *.noprefix split translatable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We cannot split single words like what we did in the previous commit. That is because the doc translations are processed in bigger chunks. Instead write the two paragraphs with the only variations being this configuration variable. Reported-by: Jean-Noël Avila Signed-off-by: Kristoffer Haugsbakk Signed-off-by: Junio C Hamano --- Documentation/diff-options.adoc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Documentation/diff-options.adoc') diff --git a/Documentation/diff-options.adoc b/Documentation/diff-options.adoc index 8f632d5fe1..fcfcdf0286 100644 --- a/Documentation/diff-options.adoc +++ b/Documentation/diff-options.adoc @@ -859,12 +859,18 @@ endif::git-format-patch[] Do not show any source or destination prefix. `--default-prefix`:: +ifdef::git-format-patch[] Use the default source and destination prefixes ("a/" and "b/"). - This overrides configuration variables such as -ifndef::git-format-patch[`diff.noprefix`,] -ifdef::git-format-patch[`format.noprefix`,] + This overrides configuration variables such as `format.noprefix`, `diff.srcPrefix`, `diff.dstPrefix`, and `diff.mnemonicPrefix` (see linkgit:git-config[1]). +endif::git-format-patch[] +ifndef::git-format-patch[] + Use the default source and destination prefixes ("a/" and "b/"). + This overrides configuration variables such as `diff.noprefix`, + `diff.srcPrefix`, `diff.dstPrefix`, and `diff.mnemonicPrefix` + (see linkgit:git-config[1]). +endif::git-format-patch[] `--line-prefix=`:: Prepend an additional __ to every line of output. -- cgit v1.3