git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Cc: Kato Kazuyoshi <kato.kazuyoshi@gmail.com>,
	Jakub Narebski <jnareb@gmail.com>
Subject: [PATCHv3 0/8] gitweb: side-by-side diff
Date: Mon, 31 Oct 2011 00:36:19 +0100	[thread overview]
Message-ID: <1320017787-18048-1-git-send-email-jnareb@gmail.com> (raw)

NOTE: As it is feature-freeze period, this patch series is for review.

This is refinement and extension of Kato Kazuyoshi patch series, sent
originally as

  [PATCH/RFC] gitweb: add the ability to show side-by-side diff on commitdiff.
  http://thread.gmane.org/gmane.comp.version-control.git/183744

and then refined and split into two-patch series

  [PATCH/RFC 1/2] gitweb: change format_diff_line() to remove leading SP from $diff_class
  http://thread.gmane.org/gmane.comp.version-control.git/183770

  [PATCH 2/2] gitweb: add a feature to show side-by-side diff
  http://thread.gmane.org/gmane.comp.version-control.git/183769

This patch series originally started as rebasing second patch in above
two part series on top of diff line classification refactoring
suggested by me and proposed by Junio.  Then I thought about putting
all code printing side-by-side diff in print_sidebyside_diff_chunk()
subroutine, then...


Main changes from v2 version from Kato Kazuyoshi:

* Built on top of refactoring of code related to diff
  output formatting (patches 1 and 2)

* Code reworked so that is in my opinion easier to follow; gitweb now
  handles merges and diffs with incomplete lines correctly (patch 3)
  - well, it handles merges by turning off side-by-side diff for them.

* Adding background color to distinguish empty context lines from
  vertical align, similarly to e.g.
    http://community.activestate.com/files/images/sbsdiffs.png
  but without refinement (word diff of changes).

* Adds some very basic test for side-by-side diff (patch 6 (and 5))

* Split adding navigation into a separate commit, and uses [nav] links
  rather than HTML form for selecting between inline and side-by-side
  diff style (diff 8).  Thanks to more thorough use of href(-replay=>1,..)
  (patch 7) style of diff should be preserved with this series.


Please excuse me for essentially hijacking this patch series.


P.S. I really, really need to finish work on splitting gitweb into
smaller pieces.  With around 8,000 lines it becomes quite unwieldy.
But this would probably need total rework of error handling (the
die_error subroutine), and that would need another changes, etc....


Pull request:
~~~~~~~~~~~~~
These changes are available in the git repository(-y/+ies) at:
  git://repo.or.cz/git/jnareb-git.git gitweb/side-by-side-diff-v4
  git://github.com/jnareb/git         gitweb/side-by-side-diff-v4

Table of contents:
~~~~~~~~~~~~~~~~~~
  [PATCHv3 1/8] gitweb: Refactor diff body line classification
  [PATCHv3 2/8] gitweb: Extract formatting of diff chunk header
  [PATCHv3 3/8] gitweb: Add a feature to show side-by-side diff
  [PATCHv3 4/8] gitweb: Give side-by-side diff extra CSS styling
  [PATCHv3 5/8] t9500: Add test for handling incomplete lines in diff
   by gitweb
  [PATCHv3 6/8] t9500: Add basic sanity tests for side-by-side diff in
   gitweb
  [PATCHv3 7/8] gitweb: Use href(-replay=>1,...) for formats links in
   "commitdiff"
  [PATCHv3 8/8] gitweb: Add navigation to select side-by-side diff

Shortlog:
~~~~~~~~~
Jakub Narebski (6):
  gitweb: Refactor diff body line classification
  gitweb: Extract formatting of diff chunk header
  gitweb: Give side-by-side diff extra CSS styling
  t9500: Add test for handling incomplete lines in diff by gitweb
  t9500: Add basic sanity tests for side-by-side diff in gitweb
  gitweb: Use href(-replay=>1,...) for formats links in "commitdiff"

Kato Kazuyoshi (2):
  gitweb: Add a feature to show side-by-side diff
  gitweb: Add navigation to select side-by-side diff

Diffstat:
~~~~~~~~~
 gitweb/gitweb.perl                     |  339 +++++++++++++++++++++++--------
 gitweb/static/gitweb.css               |   30 +++
 t/t9500-gitweb-standalone-no-errors.sh |   73 +++++++-
 3 files changed, 353 insertions(+), 89 deletions(-)

-- 
1.7.6

             reply	other threads:[~2011-10-30 23:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-30 23:36 Jakub Narebski [this message]
2011-10-30 23:36 ` [PATCHv3 1/8] gitweb: Refactor diff body line classification Jakub Narebski
2011-10-30 23:36 ` [PATCHv3 2/8] gitweb: Extract formatting of diff chunk header Jakub Narebski
2011-10-30 23:36 ` [PATCHv3 3/8] gitweb: Add a feature to show side-by-side diff Jakub Narebski
2011-10-30 23:36 ` [PATCHv3 4/8] gitweb: Give side-by-side diff extra CSS styling Jakub Narebski
2011-10-30 23:36 ` [PATCHv3 5/8] t9500: Add test for handling incomplete lines in diff by gitweb Jakub Narebski
2011-10-30 23:36 ` [PATCHv3 6/8] t9500: Add basic sanity tests for side-by-side diff in gitweb Jakub Narebski
2011-10-30 23:36 ` [PATCHv3 7/8] gitweb: Use href(-replay=>1,...) for formats links in "commitdiff" Jakub Narebski
2011-10-30 23:36 ` [PATCHv3 8/8] gitweb: Add navigation to select side-by-side diff Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1320017787-18048-1-git-send-email-jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kato.kazuyoshi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).