/** * Format this builder's state as a commit object. * * @return this object in the canonical commit format, suitable for storage * in a repository. * @throws java.io.UnsupportedEncodingException * the encoding specified by {@link #getEncoding()} is not * supported by this Java runtime. */ public byte[] toByteArray() throws UnsupportedEncodingException { return build(); }
/** * Insert a single commit into the store, returning its unique name. * * @param builder * the builder containing the proposed commit's data. * @return the name of the commit object. * @throws java.io.IOException * the object could not be stored. */ public final ObjectId insert(CommitBuilder builder) throws IOException { return insert(Constants.OBJ_COMMIT, builder.build()); }
/** * Format this builder's state as a commit object. * * @return this object in the canonical commit format, suitable for storage * in a repository. * @throws UnsupportedEncodingException * the encoding specified by {@link #getEncoding()} is not * supported by this Java runtime. */ public byte[] toByteArray() throws UnsupportedEncodingException { return build(); }
/** * Format this builder's state as a commit object. * * @return this object in the canonical commit format, suitable for storage * in a repository. * @throws java.io.UnsupportedEncodingException * the encoding specified by {@link #getEncoding()} is not * supported by this Java runtime. */ public byte[] toByteArray() throws UnsupportedEncodingException { return build(); }
/** * Create a new commit by explicitly specifying the content tree and the * parents. The commit message is not set and author/committer are set to * the current user. * * @param tree * the tree this commit should capture * @param parents * the list of parent commits * @return a new commit visible only within this merger's RevWalk. * @throws IOException */ private RevCommit createCommitForTree(ObjectId tree, List<RevCommit> parents) throws IOException { CommitBuilder c = new CommitBuilder(); c.setTreeId(tree); c.setParentIds(parents); c.setAuthor(mockAuthor(parents)); c.setCommitter(c.getAuthor()); return RevCommit.parse(walk, c.build()); }
return inserter.insert(OBJ_COMMIT, cb.build());
/** * Insert a single commit into the store, returning its unique name. * * @param builder * the builder containing the proposed commit's data. * @return the name of the commit object. * @throws IOException * the object could not be stored. */ public final ObjectId insert(CommitBuilder builder) throws IOException { return insert(Constants.OBJ_COMMIT, builder.build()); }
/** * Insert a single commit into the store, returning its unique name. * * @param builder * the builder containing the proposed commit's data. * @return the name of the commit object. * @throws java.io.IOException * the object could not be stored. */ public final ObjectId insert(CommitBuilder builder) throws IOException { return insert(Constants.OBJ_COMMIT, builder.build()); }
/** * Create a new commit by explicitly specifying the content tree and the * parents. The commit message is not set and author/committer are set to * the current user. * * @param tree * the tree this commit should capture * @param parents * the list of parent commits * @return a new commit visible only within this merger's RevWalk. * @throws IOException */ private RevCommit createCommitForTree(ObjectId tree, List<RevCommit> parents) throws IOException { CommitBuilder c = new CommitBuilder(); c.setTreeId(tree); c.setParentIds(parents); c.setAuthor(mockAuthor(parents)); c.setCommitter(c.getAuthor()); return RevCommit.parse(walk, c.build()); }
return inserter.insert(OBJ_COMMIT, cb.build());
/** * Create a new commit by explicitly specifying the content tree and the * parents. The commit message is not set and author/committer are set to * the current user. * * @param tree * the tree this commit should capture * @param parents * the list of parent commits * @return a new commit visible only within this merger's RevWalk. * @throws IOException */ private RevCommit createCommitForTree(ObjectId tree, List<RevCommit> parents) throws IOException { CommitBuilder c = new CommitBuilder(); c.setTreeId(tree); c.setParentIds(parents); c.setAuthor(mockAuthor(parents)); c.setCommitter(c.getAuthor()); return RevCommit.parse(walk, c.build()); }
return inserter.insert(OBJ_COMMIT, cb.build());