From c488867793dc9b273c1d35746452d44afcd3d7f5 Mon Sep 17 00:00:00 2001 From: Vegard Nossum Date: Thu, 12 Jan 2017 13:21:11 +0100 Subject: diff: add interhunk context config option The --inter-hunk-context= option was added in commit 6d0e674a5754 ("diff: add option to show context between close hunks"). This patch allows configuring a default for this option. Signed-off-by: Vegard Nossum Signed-off-by: Junio C Hamano --- Documentation/diff-config.txt | 6 ++++++ Documentation/diff-options.txt | 2 ++ 2 files changed, 8 insertions(+) (limited to 'Documentation') diff --git a/Documentation/diff-config.txt b/Documentation/diff-config.txt index d8570f2a75..15521f5191 100644 --- a/Documentation/diff-config.txt +++ b/Documentation/diff-config.txt @@ -60,6 +60,12 @@ diff.context:: Generate diffs with lines of context instead of the default of 3. This value is overridden by the -U option. +diff.interHunkContext:: + Show the context between diff hunks, up to the specified number + of lines, thereby fusing the hunks that are close to each other. + This value serves as the default for the `--inter-hunk-context` + command line option. + diff.external:: If this config variable is set, diff generation is not performed using the internal diff machinery, but using the diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index e6215c372c..a219aa2907 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -511,6 +511,8 @@ endif::git-format-patch[] --inter-hunk-context=:: 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. -W:: --function-context:: -- cgit v1.2.3