From: Michał Kiedrowicz Date: Thu, 29 Mar 2012 17:25:57 GMT Subject: Re: [PATCH v2 3/8] gitweb: Extract print_sidebyside_diff_lines() Message-ID: <20120329192557.4bd45322@gmail.com> In-Reply-To: <201203281633.53916.jnareb@gmail.com> Jakub Narebski wrote: > On Fri, 23 Mar 2012, Michał Kiedrowicz wrote: > > > 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. > > > The outcome of this patch is that print_sidebyside_diff_chunk() is now > > much shorter and easier to read. > > > Nice effect. > > > 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 Thanks. > > > Signed-off-by: Michał Kiedrowicz > > --- > > gitweb/gitweb.perl | 97 ++++++++++++++++++++++++++++------------------------ > > 1 files changed, 52 insertions(+), 45 deletions(-) > > Nice code movement. >