Subject: Re: [PATCH 1/2] diff: do not display hunk context under -W

From: Junio C Hamano <[email-masked]>
Date: Mon, 15 Feb 2021 17:37:15 -0800

Junio C Hamano <[email-masked]> writes:

> Ævar Arnfjörð Bjarmason  <[email-masked]> writes:
>
>> But if we viewed it with the -W option we'd show "is_empty_rec()",
>> because we'd first find the "xdl_emit_diff()" context line, extend the
>> diff to that, and then would go look for context to show again.
>
> Makes sense.

Ehh, I did not mean "the current behaviour with -W that shows
is_empty_rec makes sense".  The observation you made (which lead to
the conclusion in your next paragraph that it is not a good idea
to show is_empty_rec on the hunk header line) made sense to me.

But I do not think any change from the current behaviour should be
made if -U<n> wins -W (i.e. the first precontext line shown in the
hunk header is not due to -W).  We should hunt for the name of the
function whose latter half we are seeing at the beginning of the
hunk in that case.

Thanks.