Object VersionControlSystem.Companion
-
- All Implemented Interfaces:
public class VersionControlSystem.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private final Map<String, VersionControlSystem>ALLpublic final static VersionControlSystem.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final VersionControlSystemforType(VcsType vcsType)Return the applicable VCS for the given vcsType, or null if none is applicable. final VersionControlSystemforUrl(String vcsUrl)Return the applicable VCS for the given vcsUrl, or null if none is applicable. final WorkingTreeforDirectory(File vcsDirectory)Return the applicable VCS working tree for the given vcsDirectory, or null if none is applicable. final VcsInfogetCloneInfo(File workingDir)Return all VCS information about a workingDir. final VcsInfogetPathInfo(File path)Return all VCS information about a specific path. final List<String>getSparseCheckoutGlobPatterns()Return glob patterns for files that should be checkout out in addition to explicit sparse checkout paths. final Map<String, VersionControlSystem>getALL()All version control systems available in the classpath, sorted by their priority. -
-
Method Detail
-
forType
final VersionControlSystem forType(VcsType vcsType)
Return the applicable VCS for the given vcsType, or null if none is applicable.
-
forUrl
@Synchronized() final VersionControlSystem forUrl(String vcsUrl)
Return the applicable VCS for the given vcsUrl, or null if none is applicable.
-
forDirectory
@Synchronized() final WorkingTree forDirectory(File vcsDirectory)
Return the applicable VCS working tree for the given vcsDirectory, or null if none is applicable.
-
getCloneInfo
final VcsInfo getCloneInfo(File workingDir)
Return all VCS information about a workingDir. This is a convenience wrapper around WorkingTree.getInfo.
-
getPathInfo
final VcsInfo getPathInfo(File path)
Return all VCS information about a specific path. If path points to a nested VCS (like a Git submodule or a separate Git repository within a GitRepo working tree), information for that nested VCS is returned.
-
getSparseCheckoutGlobPatterns
final List<String> getSparseCheckoutGlobPatterns()
Return glob patterns for files that should be checkout out in addition to explicit sparse checkout paths.
-
getALL
final Map<String, VersionControlSystem> getALL()
All version control systems available in the classpath, sorted by their priority.
-
-
-
-