aboutsummaryrefslogtreecommitdiff
path: root/Documentation/diff-options.adoc
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-03-24 12:31:34 -0700
committerJunio C Hamano <gitster@pobox.com>2026-03-24 12:31:34 -0700
commitc006399b738ed602a67e6077403376a79c94bbe4 (patch)
tree685fb573eeb94c96141578a6b4cc444c2571c8f5 /Documentation/diff-options.adoc
parent8023abc632ea45a9a1b7f78b13db2cf541849775 (diff)
parent4f6a803aba9e97650af304b5c266cfbc25b11fcc (diff)
downloadgit-c006399b738ed602a67e6077403376a79c94bbe4.tar.xz
Merge branch 'ty/doc-diff-u-wo-number'
"git diff -U<num>" was too lenient in its command line parsing and took an empty string as a valid <num>. * ty/doc-diff-u-wo-number: diff: document -U without <n> as using default context
Diffstat (limited to 'Documentation/diff-options.adoc')
-rw-r--r--Documentation/diff-options.adoc6
1 files changed, 4 insertions, 2 deletions
diff --git a/Documentation/diff-options.adoc b/Documentation/diff-options.adoc
index fcfcdf0286..8a63b5e164 100644
--- a/Documentation/diff-options.adoc
+++ b/Documentation/diff-options.adoc
@@ -127,8 +127,10 @@ endif::git-log[]
`-U<n>`::
`--unified=<n>`::
- Generate diffs with _<n>_ lines of context instead of
- the usual three.
+ Generate diffs with _<n>_ lines of context. The number of context
+ lines defaults to `diff.context` or 3 if the configuration variable
+ is unset. (`-U` without `<n>` is silently accepted as a synonym for
+ `-p` due to a historical accident).
ifndef::git-format-patch[]
Implies `--patch`.
endif::git-format-patch[]