diff options
author | Robin Rosenberg <robin.rosenberg@dewire.com> | 2012-03-09 12:03:20 +0100 |
---|---|---|
committer | Robin Rosenberg <robin.rosenberg@dewire.com> | 2012-04-06 00:52:20 +0200 |
commit | fd53b454f230d70a319f32f6d5524268e0338ca6 (patch) | |
tree | 86e5b778f3ee43a856f546e03ec114b7d398352b /org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java | |
parent | e0531ace35b9c8eca9ded0a7b1540de3c49dbde6 (diff) | |
download | jgit-fd53b454f230d70a319f32f6d5524268e0338ca6.tar.gz jgit-fd53b454f230d70a319f32f6d5524268e0338ca6.zip |
Fix broken TagCommand API
Tags can be un-annotated whereby there is no RevTag object, only
a ref pointing to the tagged object.
Bug: 360650
Change-Id: I06309c45c0a896fe2a0a874700febf78c9fb87e8
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java index 7760ec02d9..32d2e01b24 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java @@ -67,7 +67,6 @@ import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.RepositoryTestCase; import org.eclipse.jgit.lib.StoredConfig; import org.eclipse.jgit.revwalk.RevCommit; -import org.eclipse.jgit.revwalk.RevTag; import org.eclipse.jgit.transport.FetchResult; import org.eclipse.jgit.transport.RefSpec; import org.eclipse.jgit.transport.RemoteConfig; @@ -264,10 +263,10 @@ public class BranchCommandTest extends RepositoryTestCase { @Test public void testCreateFromAnnotatetdTag() throws Exception { - RevTag tag = git.tag().setName("V10").setObjectId(secondCommit).call(); + Ref tagRef = git.tag().setName("V10").setObjectId(secondCommit).call(); Ref branch = git.branchCreate().setName("FromAnnotatedTag") .setStartPoint("refs/tags/V10").call(); - assertFalse(tag.getId().equals(branch.getObjectId())); + assertFalse(tagRef.getObjectId().equals(branch.getObjectId())); assertEquals(secondCommit.getId(), branch.getObjectId()); } |