/** * 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()); }
/** * 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()); }
/** * 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()); }