Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce2010-11-05 01:14:00 +0000
committerShawn O. Pearce2010-11-12 22:01:28 +0000
commit3e2b9b691ed30d53750cc08c2b89577b78e6d19a (patch)
treee66a5e0b60a6a723066a6855d1a4618333fe6862 /org.eclipse.jgit.junit/src
parentfaa0747cce9826137b3841661a5b745030fb55fe (diff)
downloadjgit-3e2b9b691ed30d53750cc08c2b89577b78e6d19a.tar.gz
jgit-3e2b9b691ed30d53750cc08c2b89577b78e6d19a.tar.xz
jgit-3e2b9b691ed30d53750cc08c2b89577b78e6d19a.zip
Allow writing a NoteMap back to the repository
This is necessary to allow applications to wrap the note tree in a commit and update the note branch with the new state. Change-Id: Idbd7ead4a1b16ae2b64a30a4a01a29cfed548cdf Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.junit/src')
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java14
1 files changed, 12 insertions, 2 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 7a95ccd368..e74af8cf71 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
@@ -184,6 +184,17 @@ public class TestRepository<R extends Repository> {
}
/**
+ * Set the author and committer using {@link #getClock()}.
+ *
+ * @param c
+ * the commit builder to store.
+ */
+ public void setAuthorAndCommitter(org.eclipse.jgit.lib.CommitBuilder c) {
+ c.setAuthor(new PersonIdent(author, new Date(now)));
+ c.setCommitter(new PersonIdent(committer, new Date(now)));
+ }
+
+ /**
* Create a new blob object in the repository.
*
* @param content
@@ -815,8 +826,7 @@ public class TestRepository<R extends Repository> {
c = new org.eclipse.jgit.lib.CommitBuilder();
c.setParentIds(parents);
- c.setAuthor(new PersonIdent(author, new Date(now)));
- c.setCommitter(new PersonIdent(committer, new Date(now)));
+ setAuthorAndCommitter(c);
c.setMessage(message);
ObjectId commitId;

Back to the top