aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/diff-context-options.adoc
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-07-29 09:28:50 -0700
committerJunio C Hamano <gitster@pobox.com>2025-07-29 09:28:50 -0700
commit393fa4b64b12da3d3fdcefb02739bb1e82291dcc (patch)
tree37d9676a25f69b289f6d738642a43ae68d8b140e /Documentation/diff-context-options.adoc
parentMerge branch 'ps/config-wo-the-repository' into next (diff)
parentadd-patch: add diff.context command line overrides (diff)
downloadgit-393fa4b64b12da3d3fdcefb02739bb1e82291dcc.tar.gz
git-393fa4b64b12da3d3fdcefb02739bb1e82291dcc.zip
Merge branch 'lm/add-p-context' into next
"git add/etc -p" now honors diff.context configuration variable, and learns to honor -U<n> option. * lm/add-p-context: add-patch: add diff.context command line overrides add-patch: respect diff.context configuration t: use test_config in t4055 t: use test_grep in t3701 and t4055
Diffstat (limited to 'Documentation/diff-context-options.adoc')
-rw-r--r--Documentation/diff-context-options.adoc10
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/diff-context-options.adoc b/Documentation/diff-context-options.adoc
new file mode 100644
index 0000000000..e161260358
--- /dev/null
+++ b/Documentation/diff-context-options.adoc
@@ -0,0 +1,10 @@
+`-U<n>`::
+`--unified=<n>`::
+ Generate diffs with _<n>_ lines of context. Defaults to `diff.context`
+ or 3 if the config option is unset.
+
+`--inter-hunk-context=<n>`::
+ Show the context between diff hunks, up to the specified _<number>_
+ of lines, thereby fusing hunks that are close to each other.
+ Defaults to `diff.interHunkContext` or 0 if the config option
+ is unset.