public final class MagicBranch extends Object
Modifier and Type | Field and Description |
---|---|
static String |
NEW_CHANGE |
static String |
NEW_DRAFT_CHANGE |
static 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 String |
getDestBranchName(String refName)
Extracts the destination from a ref name
|
static String |
getMagicRefNamePrefix(String refName)
Returns the ref name prefix for a magic branch,
null if the branch is not magic |
static boolean |
isMagicBranch(String refName)
Checks if the supplied ref name is a magic branch
|
public static final String NEW_CHANGE
public static final String NEW_DRAFT_CHANGE
public static final String NEW_PUBLISH_CHANGE
public static String getDestBranchName(String refName)
public static boolean isMagicBranch(String refName)
public static String getMagicRefNamePrefix(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)