Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce2010-08-20 22:18:25 +0000
committerShawn O. Pearce2010-08-21 00:38:53 +0000
commit707912b35d3375ea70808e176e028aa086d01451 (patch)
tree720f2af31a599e54a714e683f7385a1fc8fbb6b4 /org.eclipse.jgit.junit
parentb46b635c0389e01a55b2f9c490e5b6c54a8ce640 (diff)
downloadjgit-707912b35d3375ea70808e176e028aa086d01451.tar.gz
jgit-707912b35d3375ea70808e176e028aa086d01451.tar.xz
jgit-707912b35d3375ea70808e176e028aa086d01451.zip
Make Tag class only for writing
The Tag class now only supports the creation of an annotated tag object. To read an annotated tag, applictions should use RevTag. This permits us to have exactly one implementation, and RevTag's is faster and more bug-free. Change-Id: Ib573f7e15f36855112815269385c21dea532e2cf Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.junit')
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
index 2737b64834..9df4072b0c 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
@@ -397,9 +397,8 @@ public class TestRepository<R extends Repository> {
* @throws Exception
*/
public RevTag tag(final String name, final RevObject dst) throws Exception {
- final Tag t = new Tag(db);
- t.setType(Constants.typeString(dst.getType()));
- t.setObjId(dst.toObjectId());
+ final Tag t = new Tag();
+ t.setObjectId(dst);
t.setTag(name);
t.setTagger(new PersonIdent(committer, new Date(now)));
t.setMessage("");

Back to the top