Package com.google.gerrit.server.util
Class MagicBranch
java.lang.Object
com.google.gerrit.server.util.MagicBranch
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Capable
checkMagicBranchRefs
(org.eclipse.jgit.lib.Repository repo, 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 namestatic String
getMagicRefNamePrefix
(String refName) Returns the ref name prefix for a magic branch,null
if the branch is not magicstatic boolean
isMagicBranch
(String refName) Checks if the supplied ref name is a magic branch
-
Field Details
-
NEW_CHANGE
- See Also:
-
-
Method Details
-
getDestBranchName
Extracts the destination from a ref name -
isMagicBranch
Checks if the supplied ref name is a magic branch -
getMagicRefNamePrefix
Returns the ref name prefix for a magic branch,null
if the branch is not magic -
checkMagicBranchRefs
Checks if a (magic branch)/branch_name reference exists in the destination repository and only returns Capable.OK if it does not match any.These block the client from being able to even send us a pack file, as it is very unlikely the user passed the --force flag and the new commit is probably not going to fast-forward the branch.
-