diff options
author | Laurent Arnoud <laurent@spkdev.net> | 2020-05-22 12:46:18 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-24 16:23:59 -0700 |
commit | c28ded83fc95be8157c851c8be179733a7d4b137 (patch) | |
tree | 5c406996a33b4b729fd17b88ee342547838e902d /Documentation/diff-options.txt | |
parent | efcab5b7a3d2ce2ae4bf808b335938098b18d960 (diff) | |
download | git-c28ded83fc95be8157c851c8be179733a7d4b137.tar.gz |
diff: add config option relative
The `diff.relative` boolean option set to `true` shows only changes in
the current directory/value specified by the `path` argument of the
`relative` option and shows pathnames relative to the aforementioned
directory.
Teach `--no-relative` to override earlier `--relative`
Add for git-format-patch(1) options documentation `--relative` and
`--no-relative`
Signed-off-by: Laurent Arnoud <laurent@spkdev.net>
Acked-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/diff-options.txt')
-rw-r--r-- | Documentation/diff-options.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index bb31f0c42b..7987d72b02 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -643,15 +643,18 @@ ifndef::git-format-patch[] -R:: Swap two inputs; that is, show differences from index or on-disk file to tree contents. +endif::git-format-patch[] --relative[=<path>]:: +--no-relative:: When run from a subdirectory of the project, it can be told to exclude changes outside the directory and show pathnames relative to it with this option. When you are not in a subdirectory (e.g. in a bare repository), you can name which subdirectory to make the output relative to by giving a <path> as an argument. -endif::git-format-patch[] + `--no-relative` can be used to countermand both `diff.relative` config + option and previous `--relative`. -a:: --text:: |