aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2012-03-09 12:03:20 +0100
committerRobin Rosenberg <robin.rosenberg@dewire.com>2012-04-06 00:52:20 +0200
commitfd53b454f230d70a319f32f6d5524268e0338ca6 (patch)
tree86e5b778f3ee43a856f546e03ec114b7d398352b /org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java
parente0531ace35b9c8eca9ded0a7b1540de3c49dbde6 (diff)
downloadjgit-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.java5
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());
}