Re: [PATCH v2 3/8] gitweb: Extract print_sidebyside_diff_lines()
From: Michał Kiedrowicz <hidden>
Date: 2016-06-15 22:53:25
Jakub Narebski [off-list ref] wrote:
On Fri, 23 Mar 2012, Michał Kiedrowicz wrote:quoted
Currently, print_sidebyside_diff_chunk() does two things: it accumulates diff lines and prints them. Accumulation may be used to perform additional operations on diff lines, so it makes sense to split these two things. Thus, the code that prints diff lines in a side-by-side manner is moved out of print_sidebyside_diff_chunk() to a separate subroutine.Right, that is quite sensible.quoted
The outcome of this patch is that print_sidebyside_diff_chunk() is now much shorter and easier to read.Nice effect.quoted
This is a preparation patch for diff refinement highlightning. It should not change the gitweb output, but it slightly changes its behavior. Before this commit, context is printed on the class change. Now, it'it printed just before printing added and removed lines., and at the end of chunk. IMVHO such change is irrelevant. Acked-by: Jakub Narębski <redacted>
Thanks.
quoted
Signed-off-by: Michał Kiedrowicz <redacted> --- gitweb/gitweb.perl | 97 ++++++++++++++++++++++++++++------------------------ 1 files changed, 52 insertions(+), 45 deletions(-)Nice code movement.