diff options
Diffstat (limited to 'org.eclipse.jgit.test')
5 files changed, 7 insertions, 11 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/CherryPickTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/CherryPickTest.java index 876b98636c..12fdec2b63 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/CherryPickTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/CherryPickTest.java @@ -45,7 +45,6 @@ package org.eclipse.jgit.merge; import static org.eclipse.jgit.lib.Constants.OBJ_BLOB; -import static org.eclipse.jgit.lib.Constants.OBJ_COMMIT; import org.eclipse.jgit.dircache.DirCache; import org.eclipse.jgit.dircache.DirCacheBuilder; @@ -137,7 +136,7 @@ public class CherryPickTest extends RepositoryTestCase { c.setCommitter(c.getAuthor()); c.setParentIds(parentIds); c.setMessage("Tree " + c.getTreeId().name()); - ObjectId id = odi.insert(OBJ_COMMIT, odi.format(c)); + ObjectId id = odi.insert(c); odi.flush(); return id; } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/SimpleMergeTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/SimpleMergeTest.java index 5e7bcee1e7..659c9e3b2d 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/SimpleMergeTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/SimpleMergeTest.java @@ -45,7 +45,6 @@ package org.eclipse.jgit.merge; import static org.eclipse.jgit.lib.Constants.OBJ_BLOB; -import static org.eclipse.jgit.lib.Constants.OBJ_COMMIT; import java.io.IOException; @@ -373,7 +372,7 @@ public class SimpleMergeTest extends SampleDataRepositoryTestCase { c.setCommitter(c.getAuthor()); c.setParentIds(parentIds); c.setMessage("Tree " + c.getTreeId().name()); - ObjectId id = odi.insert(OBJ_COMMIT, odi.format(c)); + ObjectId id = odi.insert(c); odi.flush(); return id; } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java index 36730c153f..7be7dbc814 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java @@ -327,7 +327,7 @@ public class RevCommitParseTest extends RepositoryTestCase { src.setCommitter(committer); src.setMessage("Test commit\n\nThis is a test.\n"); - RevCommit p = RevCommit.parse(fmt.format(src)); + RevCommit p = RevCommit.parse(src.format()); assertEquals(src.getTreeId(), p.getTree()); assertEquals(0, p.getParentCount()); assertEquals(author, p.getAuthorIdent()); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevTagParseTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevTagParseTest.java index 727c48e8ef..c694add449 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevTagParseTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevTagParseTest.java @@ -407,7 +407,7 @@ public class RevTagParseTest extends RepositoryTestCase { src.setTag("a.test"); src.setMessage("Test tag\n\nThis is a test.\n"); - RevTag p = RevTag.parse(fmt.format(src)); + RevTag p = RevTag.parse(src.format()); assertEquals(src.getObjectId(), p.getObject()); assertEquals(committer, p.getTaggerIdent()); assertEquals("a.test", p.getTagName()); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/T0003_Basic.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/T0003_Basic.java index cd802d41ec..0352a40bfd 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/T0003_Basic.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/T0003_Basic.java @@ -693,13 +693,12 @@ public class T0003_Basic extends SampleDataRepositoryTestCase { } - private ObjectId insertCommit(final CommitBuilder commit) throws IOException, + private ObjectId insertCommit(final CommitBuilder builder) throws IOException, UnsupportedEncodingException { ObjectInserter oi = db.newObjectInserter(); try { - ObjectId id = oi.insert(Constants.OBJ_COMMIT, oi.format(commit)); + ObjectId id = oi.insert(builder); oi.flush(); - commit.setCommitId(id); return id; } finally { oi.release(); @@ -721,9 +720,8 @@ public class T0003_Basic extends SampleDataRepositoryTestCase { UnsupportedEncodingException { ObjectInserter oi = db.newObjectInserter(); try { - ObjectId id = oi.insert(Constants.OBJ_TAG, oi.format(tag)); + ObjectId id = oi.insert(tag); oi.flush(); - tag.setTagId(id); return id; } finally { oi.release(); |