src.setCommitter(committer);
src.setMessage("Test commit\n\nThis is a test.\n");
- RevCommit p = RevCommit.parse(src.format());
+ RevCommit p = RevCommit.parse(src.build());
assertEquals(src.getTreeId(), p.getTree());
assertEquals(0, p.getParentCount());
assertEquals(author, p.getAuthorIdent());
src.setTag("a.test");
src.setMessage("Test tag\n\nThis is a test.\n");
- RevTag p = RevTag.parse(src.format());
+ RevTag p = RevTag.parse(src.build());
assertEquals(src.getObjectId(), p.getObject());
assertEquals(committer, p.getTaggerIdent());
assertEquals("a.test", p.getTagName());
* the encoding specified by {@link #getEncoding()} is not
* supported by this Java runtime.
*/
- public byte[] format() throws UnsupportedEncodingException {
- return format(new ObjectInserter.Formatter());
+ public byte[] build() throws UnsupportedEncodingException {
+ return build(new ObjectInserter.Formatter());
}
/**
* the encoding specified by {@link #getEncoding()} is not
* supported by this Java runtime.
*/
- public byte[] format(ObjectInserter oi) throws UnsupportedEncodingException {
+ public byte[] build(ObjectInserter oi) throws UnsupportedEncodingException {
ByteArrayOutputStream os = new ByteArrayOutputStream();
OutputStreamWriter w = new OutputStreamWriter(os, getEncoding());
try {
* the object could not be stored.
*/
public final ObjectId insert(CommitBuilder builder) throws IOException {
- return insert(Constants.OBJ_COMMIT, builder.format(this));
+ return insert(Constants.OBJ_COMMIT, builder.build(this));
}
/**
* the object could not be stored.
*/
public final ObjectId insert(TagBuilder builder) throws IOException {
- return insert(Constants.OBJ_TAG, builder.format(this));
+ return insert(Constants.OBJ_TAG, builder.build(this));
}
/**
* @return this object in the canonical annotated tag format, suitable for
* storage in a repository.
*/
- public byte[] format() {
- return format(new ObjectInserter.Formatter());
+ public byte[] build() {
+ return build(new ObjectInserter.Formatter());
}
/**
* @return this object in the canonical annotated tag format, suitable for
* storage in a repository.
*/
- public byte[] format(ObjectInserter oi) {
+ public byte[] build(ObjectInserter oi) {
ByteArrayOutputStream os = new ByteArrayOutputStream();
OutputStreamWriter w = new OutputStreamWriter(os, Constants.CHARSET);
try {