aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2024-03-15 11:03:10 +1000
committerJunio C Hamano <gitster@pobox.com>2024-03-15 10:04:45 -0700
commit7fdc2656331f051a673a61444051cde58044ceeb (patch)
treec9435a5630c8fcdf408a64e4c465ace41c8d4790 /Documentation
parent4f9b731bdeccffa1b13e5edf4bc0428b8d49704e (diff)
downloadgit-7fdc2656331f051a673a61444051cde58044ceeb.tar.xz
diff: add diff.srcPrefix and diff.dstPrefix configuration variables
Allow the default prefixes "a/" and "b/" to be tweaked by the diff.srcPrefix and diff.dstPrefix configuration variables. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config/diff.txt6
-rw-r--r--Documentation/diff-options.txt5
2 files changed, 9 insertions, 2 deletions
diff --git a/Documentation/config/diff.txt b/Documentation/config/diff.txt
index 6c7e09a1ef..fea89291c6 100644
--- a/Documentation/config/diff.txt
+++ b/Documentation/config/diff.txt
@@ -111,6 +111,12 @@ diff.mnemonicPrefix::
diff.noprefix::
If set, 'git diff' does not show any source or destination prefix.
+diff.srcPrefix::
+ If set, 'git diff' uses this source prefix. Defaults to "a/".
+
+diff.dstPrefix::
+ If set, 'git diff' uses this destination prefix. Defaults to "b/".
+
diff.relative::
If set to 'true', 'git diff' does not show changes outside of the directory
and show pathnames relative to the current directory.
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index aaaff0d46f..0e9456957e 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -865,8 +865,9 @@ endif::git-format-patch[]
--default-prefix::
Use the default source and destination prefixes ("a/" and "b/").
- This is usually the default already, but may be used to override
- config such as `diff.noprefix`.
+ This overrides configuration variables such as `diff.noprefix`,
+ `diff.srcPrefix`, `diff.dstPrefix`, and `diff.mnemonicPrefix`
+ (see `git-config`(1)).
--line-prefix=<prefix>::
Prepend an additional prefix to every line of output.