Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce2010-08-20 15:53:46 +0000
committerShawn O. Pearce2010-08-21 00:38:52 +0000
commitb46b635c0389e01a55b2f9c490e5b6c54a8ce640 (patch)
tree582ff9587b75eb820e74188563d1c1d39c04d398 /org.eclipse.jgit.junit
parentcf9537c8ceeed05b2cc7f996009d9f2f18623782 (diff)
downloadjgit-b46b635c0389e01a55b2f9c490e5b6c54a8ce640.tar.gz
jgit-b46b635c0389e01a55b2f9c490e5b6c54a8ce640.tar.xz
jgit-b46b635c0389e01a55b2f9c490e5b6c54a8ce640.zip
Make Commit class only for writing
The Commit class now only supports the creation of a commit object. To read a commit, applictions should use RevCommit. This permits us to have exactly one implementation, and RevCommit'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.java6
1 files changed, 3 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 858fe64a6d..2737b64834 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
@@ -359,7 +359,7 @@ public class TestRepository<R extends Repository> {
final RevCommit... parents) throws Exception {
tick(secDelta);
- final Commit c = new Commit(db);
+ final Commit c = new Commit();
c.setTreeId(tree);
c.setParentIds(parents);
c.setAuthor(new PersonIdent(author, new Date(now)));
@@ -811,8 +811,8 @@ public class TestRepository<R extends Repository> {
if (self == null) {
TestRepository.this.tick(tick);
- final Commit c = new Commit(db);
- c.setParentIds(parents.toArray(new RevCommit[parents.size()]));
+ final Commit c = new Commit();
+ c.setParentIds(parents);
c.setAuthor(new PersonIdent(author, new Date(now)));
c.setCommitter(new PersonIdent(committer, new Date(now)));
c.setMessage(message);

Back to the top