Package com.google.gerrit.server.git
Class BanCommit
- java.lang.Object
-
- com.google.gerrit.server.git.BanCommit
-
public class BanCommit extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BanCommitResult
ban(Project.NameKey project, CurrentUser user, List<org.eclipse.jgit.lib.ObjectId> commitsToBan, String reason)
static org.eclipse.jgit.notes.NoteMap
loadRejectCommitsMap(org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.revwalk.RevWalk walk)
Loads a list of commits to reject fromrefs/meta/reject-commits
.
-
-
-
Method Detail
-
loadRejectCommitsMap
public static org.eclipse.jgit.notes.NoteMap loadRejectCommitsMap(org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.revwalk.RevWalk walk) throws IOException
Loads a list of commits to reject fromrefs/meta/reject-commits
.- Parameters:
repo
- repository from which the rejected commits should be loadedwalk
- open revwalk on repo.- Returns:
- NoteMap of commits to be rejected, null if there are none.
- Throws:
IOException
- the map cannot be loaded.
-
ban
public BanCommitResult ban(Project.NameKey project, CurrentUser user, List<org.eclipse.jgit.lib.ObjectId> commitsToBan, String reason) throws AuthException, com.google.gerrit.git.LockFailureException, IOException, PermissionBackendException
- Throws:
AuthException
com.google.gerrit.git.LockFailureException
IOException
PermissionBackendException
-
-