Re: [PATCH 2/2] diff: test and document -W interaction with -U<n>
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Feb 16, 2021, 07:26 UTC
- Message-ID
- <e8cd8834-0d98-9b2f-51f5-ae4f9296b9d2@kdbg.org>
- In-Reply-To
- <20210215155020.2804-3-avarab@gmail.com>
Am 15.02.21 um 16:50 schrieb Ævar Arnfjörð Bjarmason:
Show 19 quoted lines
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> > --- > Documentation/diff-options.txt | 8 ++++++++ > t/t4018-diff-funcname.sh | 5 +++++ > 2 files changed, 13 insertions(+) > > diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt > index 8ca59effa7..3c19c78616 100644 > --- a/Documentation/diff-options.txt > +++ b/Documentation/diff-options.txt > @@ -88,6 +88,11 @@ endif::git-log[] > --unified=<n>:: > Generate diffs with <n> lines of context instead of > the usual three. > ++ > +Under `-W` generates diffs with at least <n> lines of context, if the > +number is lower than the context `-U<n>` would extend the diff to then > +`-U<n>` takes precedence. > +
How about (not as separate paragraph):
When combined with `--function-context`, this specifies the minimum of context lines.
Show 10 quoted lines
> ifndef::git-format-patch[] > Implies `--patch`. > endif::git-format-patch[] > @@ -763,6 +768,9 @@ endif::git-format-patch[] > When showing the whole function for context the "@@" context line > itself will always be empty, since the context that would otherwise be > shown there will be the first line of the hunk being shown. > ++ > +See the documentation for `-U<n>` above for how the two options > +interact.
How about
Use `-U<n>` to specify a minimum of context (default three lines).
so that readers do not have to search.
-- Hannes