Re: [PATCH 2/3] xdiff: -W: include immediately preceding non-empty lines in context

2017-01-15 Thread Junio C Hamano
René Scharfe writes: > ... How bad would it be to only > implement the first part (as in the patch I just sent) without adding > new config settings or parameters? That probably is a good place to stop ;-)

Re: [PATCH 2/3] xdiff: -W: include immediately preceding non-empty lines in context

2017-01-15 Thread René Scharfe
Am 15.01.2017 um 11:06 schrieb Vegard Nossum: On 15/01/2017 03:39, Junio C Hamano wrote: René Scharfe writes: How about extending the context upward only up to and excluding a line that is either empty *or* a function line? That would limit the extra context to a single

Re: [PATCH 2/3] xdiff: -W: include immediately preceding non-empty lines in context

2017-01-15 Thread René Scharfe
Am 15.01.2017 um 03:39 schrieb Junio C Hamano: > René Scharfe writes: > >>> I am also more focused on keeping the codebase maintainable in good >>> health by making sure that we made an effort to find a solution that >>> is general-enough before solving a single specific problem

Re: [PATCH 2/3] xdiff: -W: include immediately preceding non-empty lines in context

2017-01-15 Thread Vegard Nossum
On 15/01/2017 03:39, Junio C Hamano wrote: René Scharfe writes: I am also more focused on keeping the codebase maintainable in good health by making sure that we made an effort to find a solution that is general-enough before solving a single specific problem you have today. We

Re: [PATCH 2/3] xdiff: -W: include immediately preceding non-empty lines in context

2017-01-14 Thread Junio C Hamano
René Scharfe writes: >> I am also more focused on keeping the codebase maintainable in good >> health by making sure that we made an effort to find a solution that >> is general-enough before solving a single specific problem you have >> today. We may end up deciding that a

Re: [PATCH 2/3] xdiff: -W: include immediately preceding non-empty lines in context

2017-01-14 Thread René Scharfe
Am 14.01.2017 um 00:56 schrieb Junio C Hamano: Vegard Nossum writes: The patch will work as intended and as expected for 95% of the users out there (javadoc, Doxygen, kerneldoc, etc. all have the comment immediately preceding the function) and fixes a very real

Re: [PATCH 2/3] xdiff: -W: include immediately preceding non-empty lines in context

2017-01-13 Thread Junio C Hamano
Vegard Nossum writes: > The patch will work as intended and as expected for 95% of the users out > there (javadoc, Doxygen, kerneldoc, etc. all have the comment > immediately preceding the function) and fixes a very real problem for me > (and I expect many others)

Re: [PATCH 2/3] xdiff: -W: include immediately preceding non-empty lines in context

2017-01-13 Thread Vegard Nossum
On 13/01/2017 20:51, Junio C Hamano wrote: René Scharfe writes: That's true, but I'm not sure "non-empty line before function line" is good enough a definition for desirable lines. It wouldn't work for people who don't believe in empty lines. Or for those that put a blank line

Re: [PATCH 2/3] xdiff: -W: include immediately preceding non-empty lines in context

2017-01-13 Thread Junio C Hamano
René Scharfe writes: > Am 13.01.2017 um 17:15 schrieb Vegard Nossum: >> When using -W to include the whole function in the diff context, you >> are typically doing this to be able to review the change in its entirety >> within the context of the function. It is therefore almost

Re: [PATCH 2/3] xdiff: -W: include immediately preceding non-empty lines in context

2017-01-13 Thread Stefan Beller
On Fri, Jan 13, 2017 at 10:19 AM, René Scharfe wrote: > Am 13.01.2017 um 17:15 schrieb Vegard Nossum: >> >> When using -W to include the whole function in the diff context, you >> are typically doing this to be able to review the change in its entirety >> within the context of the

Re: [PATCH 2/3] xdiff: -W: include immediately preceding non-empty lines in context

2017-01-13 Thread René Scharfe
Am 13.01.2017 um 17:15 schrieb Vegard Nossum: When using -W to include the whole function in the diff context, you are typically doing this to be able to review the change in its entirety within the context of the function. It is therefore almost always desirable to include any comments that

[PATCH 2/3] xdiff: -W: include immediately preceding non-empty lines in context

2017-01-13 Thread Vegard Nossum
When using -W to include the whole function in the diff context, you are typically doing this to be able to review the change in its entirety within the context of the function. It is therefore almost always desirable to include any comments that immediately precede the function. This also the