From: Junio C Hamano Date: Tue, 16 Feb 2021 01:37:15 GMT Subject: Re: [PATCH 1/2] diff: do not display hunk context under -W Message-ID: In-Reply-To: Junio C Hamano writes: > Ævar Arnfjörð Bjarmason 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 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.