git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: spearce@spearce.org
Cc: git@vger.kernel.org, Robin Rosenberg <robin.rosenberg@dewire.com>
Subject: [EGIT PATCH 1/3] Assert the name and origName properties of Ref objects
Date: Sun,  7 Jun 2009 22:19:09 +0200	[thread overview]
Message-ID: <1244405951-21808-2-git-send-email-robin.rosenberg@dewire.com> (raw)
In-Reply-To: <1244405951-21808-1-git-send-email-robin.rosenberg@dewire.com>

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../tst/org/spearce/jgit/lib/RefTest.java          |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefTest.java b/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefTest.java
index 440686d..fabbe7e 100644
--- a/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefTest.java
+++ b/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefTest.java
@@ -144,4 +144,15 @@ public void testReadSimplePackedRefSameRepo() throws IOException {
 		assertEquals(Storage.LOOSE_PACKED, ref.getStorage());
 	}
 
+	public void testOrigResolvedNamesBranch() throws IOException {
+		Ref ref = db.getRef("a");
+		assertEquals("refs/heads/a", ref.getName());
+		assertEquals("refs/heads/a", ref.getOrigName());
+	}
+
+	public void testOrigResolvedNamesSymRef() throws IOException {
+		Ref ref = db.getRef("HEAD");
+		assertEquals("refs/heads/master", ref.getName());
+		assertEquals("HEAD", ref.getOrigName());
+	}
 }
-- 
1.6.3.2.199.g7340d

  reply	other threads:[~2009-06-07 20:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-07 20:19 [EGIT PATCH 0/3] Ref log reader Robin Rosenberg
2009-06-07 20:19 ` Robin Rosenberg [this message]
2009-06-07 20:19   ` [EGIT PATCH 2/3] Add methods to RawParseUtils for scanning backwards Robin Rosenberg
2009-06-07 20:19     ` [EGIT PATCH 3/3] Add a ref log reader class Robin Rosenberg
2009-06-07 22:21       ` Shawn O. Pearce
2009-06-07 22:45         ` Robin Rosenberg
2009-06-07 22:47           ` Shawn O. Pearce
2009-06-08 17:28             ` [EGIT PATCH 1/2] Add methods to RawParseUtils for scanning backwards Robin Rosenberg
2009-06-08 17:28               ` [EGIT PATCH 2/2] Add a ref log reader class Robin Rosenberg
2009-06-12 19:52                 ` Shawn O. Pearce
2009-06-15 21:25                   ` [EGIT PATCH 1/2] Use a UTC relative time zone for PersonIdent Robin Rosenberg
2009-06-15 21:25                     ` [EGIT PATCH 2/2] Add a ref log reader class Robin Rosenberg
2009-06-15 22:21                       ` Robin Rosenberg

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=1244405951-21808-2-git-send-email-robin.rosenberg@dewire.com \
    --to=robin.rosenberg@dewire.com \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /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).