Class Reachable

java.lang.Object
com.google.gerrit.server.project.Reachable

public class Reachable extends Object
Report whether a commit is reachable from a set of commits. This is used for checking if a user has read permissions on a commit.
  • Method Details

    • fromRefs

      public boolean fromRefs(Project.NameKey project, org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.revwalk.RevCommit commit, List<org.eclipse.jgit.lib.Ref> refs)
      Returns true if a commit is reachable from a given set of refs. This method enforces permissions on the given set of refs and performs a reachability check. Tags are not filtered separately and will only be returned if reachable by a provided ref.