{"thread":{"id":"60854","subject":"[PATCH] doc: diff-options: clarify --relative option","startedAt":"2024-02-06T06:56:13Z","lastAt":"2024-02-06T06:56:13Z","messageCount":1,"participants":["Han Young"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"488039","messageId":"20240206065605.44457-1-hanyang.tony@bytedance.com","threadId":"60854","inReplyTo":null,"subject":"[PATCH] doc: diff-options: clarify --relative option","fromName":"Han Young","fromEmail":"hanyang.tony@bytedance.com","sentAt":"2024-02-06T06:56:05Z","receivedAt":"2024-02-06T06:56:13Z","isPatch":true,"sender":{"key":"hanyang.tony@bytedance.com","avatar":"https://avatars.githubusercontent.com/u/108711387?v=4"},"body":"In c0cb4a0679 `--relative` is given the option of specifying the path to be included in the diff output. This works by assigning the path as diff prefix. The documentation of `--relative` only mentions subdirectories, but in reality `--relative=foo` will happily display changes within the `foobar/` subdirectory or even the `foo-bar` file. Clarify the option a bit.\n\nSigned-off-by: Han Young <hanyang.tony@bytedance.com>\n---\n Documentation/diff-options.txt | 5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\nindex 53ec3c9a34..b651e442b1 100644\n--- a/Documentation/diff-options.txt\n+++ b/Documentation/diff-options.txt\n@@ -762,8 +762,9 @@ endif::git-format-patch[]\n \ttold to exclude changes outside the directory and show\n \tpathnames relative to it with this option.  When you are\n \tnot in a subdirectory (e.g. in a bare repository), you\n-\tcan name which subdirectory to make the output relative\n-\tto by giving a <path> as an argument.\n+\tcan name which path to make the output relative\n+\tto by giving a <path> as an argument (e.g. `--relative=foo/`\n+\twill only show changes inside `foo` subdirectory).\n \t`--no-relative` can be used to countermand both `diff.relative` config\n \toption and previous `--relative`.\n \n-- \n2.43.0\n\n"}]}