public final class MagicBranch
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NEW_CHANGE |
static java.lang.String |
NEW_DRAFT_CHANGE |
static java.lang.String |
NEW_PUBLISH_CHANGE |
Modifier and Type | Method and Description |
---|---|
static com.google.gerrit.common.data.Capable |
checkMagicBranchRefs(org.eclipse.jgit.lib.Repository repo,
com.google.gerrit.reviewdb.client.Project project)
Checks if a (magic branch)/branch_name reference exists in the
destination repository and only returns Capable.OK if it does not match any.
|
static java.lang.String |
getDestBranchName(java.lang.String refName)
Extracts the destination from a ref name
|
static java.lang.String |
getMagicRefNamePrefix(java.lang.String refName)
Returns the ref name prefix for a magic branch,
null if the branch is not magic |
static boolean |
isMagicBranch(java.lang.String refName)
Checks if the supplied ref name is a magic branch
|
public static final java.lang.String NEW_CHANGE
public static final java.lang.String NEW_DRAFT_CHANGE
public static final java.lang.String NEW_PUBLISH_CHANGE
public static java.lang.String getDestBranchName(java.lang.String refName)
public static boolean isMagicBranch(java.lang.String refName)
public static java.lang.String getMagicRefNamePrefix(java.lang.String refName)
null
if the branch is not magicpublic static com.google.gerrit.common.data.Capable checkMagicBranchRefs(org.eclipse.jgit.lib.Repository repo, com.google.gerrit.reviewdb.client.Project project)