Class MagicBranch


  • public final class MagicBranch
    extends Object
    • Method Detail

      • getDestBranchName

        public static String getDestBranchName​(String refName)
        Extracts the destination from a ref name
      • isMagicBranch

        public static boolean isMagicBranch​(String refName)
        Checks if the supplied ref name is a magic branch
      • getMagicRefNamePrefix

        public static String getMagicRefNamePrefix​(String refName)
        Returns the ref name prefix for a magic branch, null if the branch is not magic
      • checkMagicBranchRefs

        public static 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.

        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.