Package com.google.gerrit.server.notedb
Class DeleteChangeMessageRewriter
java.lang.Object
com.google.gerrit.server.notedb.DeleteChangeMessageRewriter
- All Implemented Interfaces:
NoteDbRewriter
Deletes a change message from NoteDb by rewriting the commit history. After deletion, the whole
change message will be replaced by a new message indicating the original change message has been
deleted for the given reason.
-
Method Summary
Modifier and TypeMethodDescriptionGets the name of the target ref which will be rewritten.org.eclipse.jgit.lib.ObjectId
rewriteCommitHistory
(org.eclipse.jgit.revwalk.RevWalk revWalk, org.eclipse.jgit.lib.ObjectInserter inserter, org.eclipse.jgit.lib.ObjectId currTip) Rewrites the commit history.
-
Method Details
-
getRefName
Description copied from interface:NoteDbRewriter
Gets the name of the target ref which will be rewritten.- Specified by:
getRefName
in interfaceNoteDbRewriter
-
rewriteCommitHistory
public org.eclipse.jgit.lib.ObjectId rewriteCommitHistory(org.eclipse.jgit.revwalk.RevWalk revWalk, org.eclipse.jgit.lib.ObjectInserter inserter, org.eclipse.jgit.lib.ObjectId currTip) throws IOException Description copied from interface:NoteDbRewriter
Rewrites the commit history.- Specified by:
rewriteCommitHistory
in interfaceNoteDbRewriter
- Parameters:
revWalk
- aRevWalk
instance.inserter
- aObjectInserter
instance.currTip
- theObjectId
of the ref's tip commit.- Returns:
- the
ObjectId
of the ref's new tip commit. - Throws:
IOException
-