Package com.google.gerrit.server.project
Class Reachable
java.lang.Object
com.google.gerrit.server.project.Reachable
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 Summary
Modifier and TypeMethodDescriptionboolean
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.
-
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.
-