On 2020-05-18 13:37:55-0700, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Đoàn Trần Công Danh <congdanhqx@xxxxxxxxx> writes: > > > We don't document --relative for git-format-patch, the --relative > > documentation is placed under the guard, for that matter: > > Yup, since it does not make much sense or "diff.relative" for that > matter in the context of the "format-patch". In the same sense, -R > makes little sense, so sane people would not want to read about the > option in the documentation, I would think. Sane people wouldn't want to read that document when we don't have the config for diff.relative But, now, we have. Let's document --no-relative, specifically for git-format-patch(1). Perhaps something like this (maybe just fixing up to Laurent's) -----------------8<-------------- From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= <congdanhqx@xxxxxxxxx> Date: Tue, 19 May 2020 07:24:48 +0700 Subject: [PATCH] Documentation: document --no-relative for format-patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-format-patch(1) accepts --relative for a long time, but the generated patch couldn't be applied without accompanying information. Hence, we've never document --relative for git-format-patch(1). Now, we've introduced `diff.relative` config, let's tell Git's users that they have an option to override it. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@xxxxxxxxx> --- Documentation/diff-options.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 167b451b89..0f5c108324 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -654,6 +654,11 @@ ifndef::git-format-patch[] `--no-relative` can be used to countermand both `diff.relative` config option and previous `--relative`. endif::git-format-patch[] +ifdef::git-format-patch[] +--no-relative:: + Countermand `diff.relative` config. Show all changes in the repository + with pathname relative to top-level directory of the repository. +endif::git-format-patch[] -a:: --text:: -- Danh