git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [JGIT PATCH 00/12] Patch API bug fixes and diff --cc suport
@ 2008-12-12 22:05 Shawn O. Pearce
  2008-12-12 22:05 ` [JGIT PATCH 01/12] Assert the HunkHeader.getFileHeader returns the right file Shawn O. Pearce
  0 siblings, 1 reply; 14+ messages in thread
From: Shawn O. Pearce @ 2008-12-12 22:05 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: git

This series addes new unit tests for the patch API, closing some
gaps in our test coverage.  Some of those tests identified bugs in
the implementation, and those are now fixed.

The final patch in the series adds support for "diff -cc" patches,
used to show an "evil merge" commit's conflict resolution.

Shawn O. Pearce (12):
  Assert the HunkHeader.getFileHeader returns the right file
  Add tests to cover more methods of BinaryHunk
  Add a simple toString to FormatError to facilitate debugging
  Allow FileHeader to create its HunkHeader children
  Refactor the old/pre-image data in HunkHeader to support >1 ancestor
  Assert the ChunkHeader.OldImage.getId uses FileHeader.getOldImage
  Allow a stray LF at the end of a hunk
  Fix HunkHeader start line when parsing "@@ -1 +1 @@" style headers
  Add test cases for parsing "\ No newline at end of file" style
    patches
  Use FileMode.MISSING when a file is added or deleted rather than null
  Add a test for delta binary patch parsing and fix a bug in it
  Add support for parsing "diff --cc" style patches

 .../spearce/jgit/patch/EGitPatchHistoryTest.java   |    4 +-
 .../tst/org/spearce/jgit/patch/FileHeaderTest.java |    4 +-
 .../org/spearce/jgit/patch/PatchCcErrorTest.java   |   97 +++++++++
 .../tst/org/spearce/jgit/patch/PatchCcTest.java    |  200 ++++++++++++++++++
 .../tst/org/spearce/jgit/patch/PatchTest.java      |  165 +++++++++++++--
 .../jgit/patch/testError_CcTruncatedOld.patch      |   24 +++
 .../jgit/patch/testParse_AddNoNewline.patch        |   20 ++
 .../jgit/patch/testParse_CcDeleteFile.patch        |   12 +
 .../spearce/jgit/patch/testParse_CcNewFile.patch   |   14 ++
 .../jgit/patch/testParse_FixNoNewline.patch        |   20 ++
 .../jgit/patch/testParse_GitBinaryDelta.patch      |   21 ++
 ...nary.patch => testParse_GitBinaryLiteral.patch} |    0
 .../spearce/jgit/patch/testParse_OneFileCc.patch   |   27 +++
 .../src/org/spearce/jgit/patch/BinaryHunk.java     |    2 +-
 .../org/spearce/jgit/patch/CombinedFileHeader.java |  213 ++++++++++++++++++++
 .../org/spearce/jgit/patch/CombinedHunkHeader.java |  191 ++++++++++++++++++
 .../src/org/spearce/jgit/patch/FileHeader.java     |   64 ++++--
 .../src/org/spearce/jgit/patch/FormatError.java    |   14 ++
 .../src/org/spearce/jgit/patch/HunkHeader.java     |  134 +++++++-----
 .../src/org/spearce/jgit/patch/Patch.java          |   24 ++-
 20 files changed, 1134 insertions(+), 116 deletions(-)
 create mode 100644 org.spearce.jgit.test/tst/org/spearce/jgit/patch/PatchCcErrorTest.java
 create mode 100644 org.spearce.jgit.test/tst/org/spearce/jgit/patch/PatchCcTest.java
 create mode 100644 org.spearce.jgit.test/tst/org/spearce/jgit/patch/testError_CcTruncatedOld.patch
 create mode 100644 org.spearce.jgit.test/tst/org/spearce/jgit/patch/testParse_AddNoNewline.patch
 create mode 100644 org.spearce.jgit.test/tst/org/spearce/jgit/patch/testParse_CcDeleteFile.patch
 create mode 100644 org.spearce.jgit.test/tst/org/spearce/jgit/patch/testParse_CcNewFile.patch
 create mode 100644 org.spearce.jgit.test/tst/org/spearce/jgit/patch/testParse_FixNoNewline.patch
 create mode 100644 org.spearce.jgit.test/tst/org/spearce/jgit/patch/testParse_GitBinaryDelta.patch
 rename org.spearce.jgit.test/tst/org/spearce/jgit/patch/{testParse_GitBinary.patch => testParse_GitBinaryLiteral.patch} (100%)
 create mode 100644 org.spearce.jgit.test/tst/org/spearce/jgit/patch/testParse_OneFileCc.patch
 create mode 100644 org.spearce.jgit/src/org/spearce/jgit/patch/CombinedFileHeader.java
 create mode 100644 org.spearce.jgit/src/org/spearce/jgit/patch/CombinedHunkHeader.java

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-12-12 23:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-12 22:05 [JGIT PATCH 00/12] Patch API bug fixes and diff --cc suport Shawn O. Pearce
2008-12-12 22:05 ` [JGIT PATCH 01/12] Assert the HunkHeader.getFileHeader returns the right file Shawn O. Pearce
2008-12-12 22:05   ` [JGIT PATCH 02/12] Add tests to cover more methods of BinaryHunk Shawn O. Pearce
2008-12-12 22:05     ` [JGIT PATCH 03/12] Add a simple toString to FormatError to facilitate debugging Shawn O. Pearce
2008-12-12 22:05       ` [JGIT PATCH 04/12] Allow FileHeader to create its HunkHeader children Shawn O. Pearce
2008-12-12 22:05         ` [JGIT PATCH 05/12] Refactor the old/pre-image data in HunkHeader to support >1 ancestor Shawn O. Pearce
2008-12-12 22:05           ` [JGIT PATCH 06/12] Assert the ChunkHeader.OldImage.getId uses FileHeader.getOldImage Shawn O. Pearce
2008-12-12 22:05             ` [JGIT PATCH 07/12] Allow a stray LF at the end of a hunk Shawn O. Pearce
2008-12-12 22:05               ` [JGIT PATCH 08/12] Fix HunkHeader start line when parsing "@@ -1 +1 @@" style headers Shawn O. Pearce
2008-12-12 22:05                 ` [JGIT PATCH 09/12] Add test cases for parsing "\ No newline at end of file" style patches Shawn O. Pearce
2008-12-12 22:05                   ` [JGIT PATCH 10/12] Use FileMode.MISSING when a file is added or deleted rather than null Shawn O. Pearce
2008-12-12 22:05                     ` [JGIT PATCH 11/12] Add a test for delta binary patch parsing and fix a bug in it Shawn O. Pearce
2008-12-12 22:05                       ` [JGIT PATCH 12/12] Add support for parsing "diff --cc" style patches Shawn O. Pearce
2008-12-12 23:19                         ` [JGIT PATCH 12/12 v2] " Shawn O. Pearce

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).