summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-03-28 21:13:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2024-03-28 21:13:50 (GMT)
commit396430b5a73f60acc2ce8365a9edfe6923014ca3 (patch)
treef74eccaa536a7059547c585b9f95c3ede8540937 /Documentation
parent1002f28a527d33893f7dab068dbac7011f84af65 (diff)
parent178401dc25cf8c3f1a716b852b14dafa79367646 (diff)
downloadgit-396430b5a73f60acc2ce8365a9edfe6923014ca3.zip
git-396430b5a73f60acc2ce8365a9edfe6923014ca3.tar.gz
git-396430b5a73f60acc2ce8365a9edfe6923014ca3.tar.bz2
Merge branch 'ph/diff-src-dst-prefix-config'
"git diff" and friends learned two extra configuration variables, diff.srcPrefix and diff.dstPrefix. * ph/diff-src-dst-prefix-config: diff.*Prefix: use camelCase in the doc and test titles diff: add diff.srcPrefix and diff.dstPrefix configuration variables
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config/diff.txt8
-rw-r--r--Documentation/diff-options.txt5
2 files changed, 10 insertions, 3 deletions
diff --git a/Documentation/config/diff.txt b/Documentation/config/diff.txt
index 6c7e09a..5ce7b91 100644
--- a/Documentation/config/diff.txt
+++ b/Documentation/config/diff.txt
@@ -108,9 +108,15 @@ diff.mnemonicPrefix::
`git diff --no-index a b`;;
compares two non-git things (1) and (2).
-diff.noprefix::
+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 aaaff0d..0e94569 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.