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>
Cc: git@vger.kernel.org
Subject: [JGIT PATCH 01/12] Assert the HunkHeader.getFileHeader returns the right file
Date: Fri, 12 Dec 2008 14:05:47 -0800	[thread overview]
Message-ID: <1229119558-1293-2-git-send-email-spearce@spearce.org> (raw)
In-Reply-To: <1229119558-1293-1-git-send-email-spearce@spearce.org>

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 .../tst/org/spearce/jgit/patch/PatchTest.java      |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/org.spearce.jgit.test/tst/org/spearce/jgit/patch/PatchTest.java b/org.spearce.jgit.test/tst/org/spearce/jgit/patch/PatchTest.java
index 7c69fff..5850364 100644
--- a/org.spearce.jgit.test/tst/org/spearce/jgit/patch/PatchTest.java
+++ b/org.spearce.jgit.test/tst/org/spearce/jgit/patch/PatchTest.java
@@ -80,6 +80,7 @@ assertSame(FileHeader.PatchType.UNIFIED, fRepositoryConfigTest
 		assertEquals(1, fRepositoryConfigTest.getHunks().size());
 		{
 			final HunkHeader h = fRepositoryConfigTest.getHunks().get(0);
+			assertSame(fRepositoryConfigTest, h.getFileHeader());
 			assertEquals(921, h.startOffset);
 			assertEquals(109, h.getOldStartLine());
 			assertEquals(4, h.getOldLineCount());
@@ -102,6 +103,7 @@ assertSame(FileHeader.PatchType.UNIFIED, fRepositoryConfig
 		assertEquals(3, fRepositoryConfig.getHunks().size());
 		{
 			final HunkHeader h = fRepositoryConfig.getHunks().get(0);
+			assertSame(fRepositoryConfig, h.getFileHeader());
 			assertEquals(1803, h.startOffset);
 			assertEquals(236, h.getOldStartLine());
 			assertEquals(9, h.getOldLineCount());
-- 
1.6.1.rc2.306.ge5d5e

  reply	other threads:[~2008-12-12 22:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Shawn O. Pearce [this message]
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

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=1229119558-1293-2-git-send-email-spearce@spearce.org \
    --to=spearce@spearce.org \
    --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).