Subject: Re: [PATCH 0/8] gitweb: Highlight interesting parts of diff

From: Jakub Narebski <[email-masked]>
Date: Sat, 11 Feb 2012 10:32:12 -0800 (PST)

Michał Kiedrowicz <[email-masked]> writes:

>   gitweb: Use print_diff_chunk() for both side-by-side and inline diffs
>   gitweb: Move HTML-formatting diff line back to process_diff_line()
>   gitweb: Push formatting diff lines to print_diff_chunk()
>   gitweb: Format diff lines just before printing

Those patshes are expected to not change gitweb output.  Did you check
that gitweb after those changes handles incomplete line marker
correctly?  print_sidebyside_diff_chunk() ealt with 'incomplete' class
in slightly hacky way, assuming side-by-side output.

Namely, does gitweb after those patches print incomplete line marker
correctly, i.e. only once for "inline" output while it prints it for
both sides in "side-by-side" output, and using 'incomplete' class?

You have to treat correctly all the following situations:

* removing end of line at end of file (eol-at-eof):

  diff --git a/a b/b
  index 257cc56..1910281 100644
  --- a/a
  +++ b/b
  @@ -1 +1 @@
  -foo
  +foo
  \ No newline at end of file

* adding eol-at-eof:

  diff --git b/b a/a
  index 1910281..257cc56 100644
  --- b/b
  +++ a/a
  @@ -1 +1 @@
  -foo
  \ No newline at end of file
  +foo

* removing from end of file, preserving lack of eol-at-eof:

  diff --git b/c a/a
  index a5d4a2f..257cc56 100644
  --- b/c
  +++ a/a
  @@ -1,2 +1 @@
   foo
  -foo
  \ No newline at end of file

* change at the end of file, preserving lack of eol-at-eof:

  diff --git a/b b/d
  index 1910281..ba0e162 100644
  --- a/b
  +++ b/d
  @@ -1 +1 @@
  -foo
  \ No newline at end of file
  +bar
  \ No newline at end of file

* change near the end of file, with incomplete line marker in context

  diff --git b/c a/b
  index a5d4a2f..1910281 100644
  --- b/c
  +++ a/b
  @@ -1,2 +1 @@
  -foo
   foo
  \ No newline at end of file

-- 
Jakub Narębski