Package com.google.gerrit.server.git
Class CommitUtil
- java.lang.Object
- 
- com.google.gerrit.server.git.CommitUtil
 
- 
 public class CommitUtil extends Object Static utilities for working withRevCommits.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Change.IdcreateRevertChange(ChangeNotes notes, CurrentUser user, RevertInput input, Timestamp timestamp)Allows creating a revert change.org.eclipse.jgit.lib.ObjectIdcreateRevertCommit(String message, ChangeNotes notes, CurrentUser user, Timestamp ts)Wrapper function for creating a revert Commit.static CommitInfotoCommitInfo(org.eclipse.jgit.revwalk.RevCommit commit)static CommitInfotoCommitInfo(org.eclipse.jgit.revwalk.RevCommit commit, org.eclipse.jgit.revwalk.RevWalk walk)
 
- 
- 
- 
Method Detail- 
toCommitInfopublic static CommitInfo toCommitInfo(org.eclipse.jgit.revwalk.RevCommit commit) throws IOException - Throws:
- IOException
 
 - 
toCommitInfopublic static CommitInfo toCommitInfo(org.eclipse.jgit.revwalk.RevCommit commit, org.eclipse.jgit.revwalk.RevWalk walk) throws IOException - Throws:
- IOException
 
 - 
createRevertChangepublic Change.Id createRevertChange(ChangeNotes notes, CurrentUser user, RevertInput input, Timestamp timestamp) throws RestApiException, UpdateException, org.eclipse.jgit.errors.ConfigInvalidException, IOException Allows creating a revert change.- Parameters:
- notes- ChangeNotes of the change being reverted.
- user- Current User performing the revert.
- input- the RevertInput entity for conducting the revert.
- timestamp- timestamp for the created change.
- Returns:
- ObjectId that represents the newly created commit.
- Throws:
- RestApiException
- UpdateException
- org.eclipse.jgit.errors.ConfigInvalidException
- IOException
 
 - 
createRevertCommitpublic org.eclipse.jgit.lib.ObjectId createRevertCommit(String message, ChangeNotes notes, CurrentUser user, Timestamp ts) throws RestApiException, IOException Wrapper function for creating a revert Commit.- Parameters:
- message- Commit message for the revert commit.
- notes- ChangeNotes of the change being reverted.
- user- Current User performing the revert.
- ts- Timestamp of creation for the commit.
- Returns:
- ObjectId that represents the newly created commit.
- Throws:
- RestApiException
- IOException
 
 
- 
 
-