Re: [Bug?] log -p -W showing the whole file for a patch that adds to the end?

2016-05-28 Thread René Scharfe
Am 21.05.2016 um 20:42 schrieb René Scharfe: > Am 11.05.2016 um 00:51 schrieb Junio C Hamano: >> The helper function get_func_line() however gets confused when a >> hunk adds a new function at the very end, and returns -1 to signal >> that it did not find a suitable "function header line", i.e.

Re: [Bug?] log -p -W showing the whole file for a patch that adds to the end?

2016-05-27 Thread René Scharfe
Am 26.05.2016 um 19:05 schrieb Junio C Hamano: I'd say that these patches are fine as they are, and follow-up patch for adding -W tests (instead of rerolling them) is sufficient, though. Patch 3 needs two small updates to address the char signedness issue found by Ramsay and to get rid of an

Re: [Bug?] log -p -W showing the whole file for a patch that adds to the end?

2016-05-26 Thread Junio C Hamano
René Scharfe writes: > Am 24.05.2016 um 20:16 schrieb Junio C Hamano: >> René Scharfe writes: >> >>>diff: factor out match_func_rec() >>>diff: handle appended chunks better with -W >>>diff: ignore empty lines before added functions with -W >>>diff:

Re: [Bug?] log -p -W showing the whole file for a patch that adds to the end?

2016-05-26 Thread René Scharfe
Am 24.05.2016 um 20:16 schrieb Junio C Hamano: René Scharfe writes: diff: factor out match_func_rec() diff: handle appended chunks better with -W diff: ignore empty lines before added functions with -W diff: don't include common trailing empty lines with -W grep:

Re: [Bug?] log -p -W showing the whole file for a patch that adds to the end?

2016-05-24 Thread Junio C Hamano
René Scharfe writes: > diff: factor out match_func_rec() > diff: handle appended chunks better with -W > diff: ignore empty lines before added functions with -W > diff: don't include common trailing empty lines with -W > grep: don't extend context to trailing empty lines

Re: [Bug?] log -p -W showing the whole file for a patch that adds to the end?

2016-05-21 Thread René Scharfe
Am 11.05.2016 um 00:51 schrieb Junio C Hamano: > The helper function get_func_line() however gets confused when a > hunk adds a new function at the very end, and returns -1 to signal > that it did not find a suitable "function header line", i.e. the > beginning of previous function. The caller

Re: [Bug?] log -p -W showing the whole file for a patch that adds to the end?

2016-05-12 Thread René Scharfe
Am 11.05.2016 um 00:51 schrieb Junio C Hamano: The helper function get_func_line() however gets confused when a hunk adds a new function at the very end, and returns -1 to signal that it did not find a suitable "function header line", i.e. the beginning of previous function. The caller then

Re: [Bug?] log -p -W showing the whole file for a patch that adds to the end?

2016-05-10 Thread Junio C Hamano
Junio C Hamano writes: > Just noticed a curiosity: > > $ git show -W 3e3ceaa58 quote.c > > shows the entire file. The commit in question adds a whole new > function at the end of the file. If I move that addition to just > before the last function the file already had

[Bug?] log -p -W showing the whole file for a patch that adds to the end?

2016-05-10 Thread Junio C Hamano
Just noticed a curiosity: $ git show -W 3e3ceaa58 quote.c shows the entire file. The commit in question adds a whole new function at the end of the file. If I move that addition to just before the last function the file already had before the change and amend the commit, "show -W" would