diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-08-20 15:18:25 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2010-08-20 17:38:53 -0700 |
commit | 707912b35d3375ea70808e176e028aa086d01451 (patch) | |
tree | 720f2af31a599e54a714e683f7385a1fc8fbb6b4 /org.eclipse.jgit.junit | |
parent | b46b635c0389e01a55b2f9c490e5b6c54a8ce640 (diff) | |
download | jgit-707912b35d3375ea70808e176e028aa086d01451.tar.gz 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.java | 5 |
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(""); |