git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg@dewire.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: [JGIT PATCH 0/6] Diff processing utilities
Date: Fri,  1 May 2009 19:08:41 -0700	[thread overview]
Message-ID: <1241230127-28279-1-git-send-email-spearce@spearce.org> (raw)

Back in late 2008 Dscho started writing some basic diff routines
for JGit.  That work got partially shelved when he had to move onto
more important day-job topics.  This series is starting to revive
some portions of his work, and bring it into JGit.

In particular I want at least this much merged, so I can use it
in Gerrit Code Review to massage an existing patch file before I
display it.  Currently most of that logic is within Gerrit, and
I'd much rather push it down into JGit where anyone can reuse it.

To be clear, this series *does not* contain a way to create a diff.
Dscho wrote much more code which is not yet ready for inclusion.

After applying this series we have an EditList describing what
happened in an existing patch we parsed with the existing Patch
class, and a DiffFormatter which can be used to reflow a patch
script if the repository has both the pre and post image objects.

The formatter part is really only useful if the repository created
the patch script, or received the objects over a git native object
transport, like Gerrit Code Review does with SSH.

Dscho, can you give us yea-or-nay for SBO lines for the patches
I've attributed to you?


Johannes E. Schindelin (3):
  Add diff.Edit to describe an edit region within a file
  Add diff.RawText to index a file content for later compares
  Add diff.DiffFormatter to create Git style unified patch scripts

Shawn O. Pearce (3):
  Add set to IntList
  Add diff.EditList to provide for a list of Edit instances
  Teach FileHeader, HunkHeader how to create an EditList

 .../spearce/jgit/patch/testEditList_Types.patch    |   24 +++
 .../tst/org/spearce/jgit/diff/EditListTest.java    |  121 +++++++++++++
 .../tst/org/spearce/jgit/diff/EditTest.java        |  139 ++++++++++++++
 .../tst/org/spearce/jgit/diff/RawTextTest.java     |   93 ++++++++++
 .../tst/org/spearce/jgit/patch/EditListTest.java   |   95 ++++++++++
 .../tst/org/spearce/jgit/util/IntListTest.java     |   21 +++
 .../src/org/spearce/jgit/diff/DiffFormatter.java   |  187 +++++++++++++++++++
 .../src/org/spearce/jgit/diff/Edit.java            |  189 ++++++++++++++++++++
 .../src/org/spearce/jgit/diff/EditList.java        |   93 ++++++++++
 .../src/org/spearce/jgit/diff/RawText.java         |  172 ++++++++++++++++++
 .../src/org/spearce/jgit/diff/Sequence.java        |   78 ++++++++
 .../src/org/spearce/jgit/patch/FileHeader.java     |    9 +
 .../src/org/spearce/jgit/patch/HunkHeader.java     |   48 +++++
 .../src/org/spearce/jgit/util/IntList.java         |   17 ++
 14 files changed, 1286 insertions(+), 0 deletions(-)
 create mode 100644 org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch/testEditList_Types.patch
 create mode 100644 org.spearce.jgit.test/tst/org/spearce/jgit/diff/EditListTest.java
 create mode 100644 org.spearce.jgit.test/tst/org/spearce/jgit/diff/EditTest.java
 create mode 100644 org.spearce.jgit.test/tst/org/spearce/jgit/diff/RawTextTest.java
 create mode 100644 org.spearce.jgit.test/tst/org/spearce/jgit/patch/EditListTest.java
 create mode 100644 org.spearce.jgit/src/org/spearce/jgit/diff/DiffFormatter.java
 create mode 100644 org.spearce.jgit/src/org/spearce/jgit/diff/Edit.java
 create mode 100644 org.spearce.jgit/src/org/spearce/jgit/diff/EditList.java
 create mode 100644 org.spearce.jgit/src/org/spearce/jgit/diff/RawText.java
 create mode 100644 org.spearce.jgit/src/org/spearce/jgit/diff/Sequence.java

             reply	other threads:[~2009-05-02  2:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-02  2:08 Shawn O. Pearce [this message]
2009-05-02  2:08 ` [JGIT PATCH 1/6] Add set to IntList Shawn O. Pearce
2009-05-02  2:08   ` [JGIT PATCH 2/6] Add diff.Edit to describe an edit region within a file Shawn O. Pearce
2009-05-02  2:08     ` [JGIT PATCH 3/6] Add diff.EditList to provide for a list of Edit instances Shawn O. Pearce
2009-05-02  2:08       ` [JGIT PATCH 4/6] Add diff.RawText to index a file content for later compares Shawn O. Pearce
2009-05-02  2:08         ` [JGIT PATCH 5/6] Teach FileHeader, HunkHeader how to create an EditList Shawn O. Pearce
2009-05-02  2:08           ` [JGIT PATCH 6/6] Add diff.DiffFormatter to create Git style unified patch scripts Shawn O. Pearce
2009-05-03  0:03             ` [JGIT PATCH v2 " Shawn O. Pearce
2009-05-03  0:29               ` [JGIT PATCH v3 " Shawn O. Pearce
2009-05-03  7:07   ` [JGIT PATCH 1/6] Add set to IntList Robin Rosenberg
2009-05-04 14:22     ` Shawn O. Pearce
2009-05-04 14:50       ` Johannes Schindelin
2009-05-04 14:55         ` Shawn O. Pearce
2009-05-04 15:10           ` Johannes Schindelin
2009-05-03 14:24 ` [JGIT PATCH 0/6] Diff processing utilities Johannes Schindelin

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=1241230127-28279-1-git-send-email-spearce@spearce.org \
    --to=spearce@spearce.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=robin.rosenberg@dewire.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).