| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| private final Collection | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| public | |
| public | FileResolver(File
the base path all repositories are rooted under. basePath, boolean if true, exports all repositories, ignoring the check for the
exportAll)git-daemon-export-ok files.Create a new resolver for the given path. |
| Modifier and Type | Method and Description |
|---|---|
| public void | exportDirectory(File
the directory to export. This directory must not itself be a
git repository, but any directory below it which has a file
named dir)git-daemon-export-ok will be published.Recursively export all Git repositories within a directory. |
| public void | exportRepository(String
name the repository will be published under. name, Repository the repository instance. db)Add a single repository to the set that is exported by this daemon. |
| public boolean | Returns: false ifgit-daemon-export-ok is required to export
a repository; true if git-daemon-export-ok is
ignored.Whether |
| protected boolean | Returns: true if the repository is accessible; false if not.the current HTTP request. req, String name of the repository, as present in the URL. repositoryName, Repository the opened repository instance. db)Check if this repository can be served. |
| private static boolean | |
| public Repository | open(C
the current request, may be used to inspect session state
including cookies or user authentication. req, String name of the repository, as parsed out of the URL. name)Implements org. Locate and open a reference to a |
| public void |
| exportAll | back to summary |
|---|---|
| private volatile boolean exportAll | |
| exportBase | back to summary |
|---|---|
| private final Collection<File> exportBase | |
| exports | back to summary |
|---|---|
| private final Map<String, Repository> exports | |
| FileResolver | back to summary |
|---|---|
| public FileResolver() Initialize an empty file based resolver. | |
| FileResolver | back to summary |
|---|---|
| public FileResolver(File basePath, boolean exportAll) Create a new resolver for the given path.
| |
| exportDirectory | back to summary |
|---|---|
| public void exportDirectory(File dir) Recursively export all Git repositories within a directory.
| |
| exportRepository | back to summary |
|---|---|
| public void exportRepository(String name, Repository db) Add a single repository to the set that is exported by this daemon.
The existence (or lack-thereof) of
| |
| isExportAll | back to summary |
|---|---|
| public boolean isExportAll() Whether
| |
| isExportOk | back to summary |
|---|---|
| protected boolean isExportOk(C req, String repositoryName, Repository db) throws IOException Check if this repository can be served.
The default implementation of this method returns true only if either
| |
| isUnreasonableName | back to summary |
|---|---|
| private static boolean isUnreasonableName(String name) | |
| open | back to summary |
|---|---|
| public Repository open(C req, String name) throws RepositoryNotFoundException, ServiceNotEnabledException Implements org. Doc from org. Locate and open a reference to a The caller is responsible for closing the returned Repository.
| |
| setExportAll | back to summary |
|---|---|
| public void setExportAll(boolean export) Set whether or not to export all repositories.
If false (the default), repositories must have a
If true, all repositories are available through the daemon, whether or
not
| |