| com.atlassian.bitbucket.scm.git.GitScmConfig |
This interface is deprecated.
in 5.10 for removal without replacement in 6.0. Starting in 6.0 add-ons will no longer
be allowed to directly access repository data on disk. Instead, they will be required to use
commands, command builders and other API services to interact with repositories. Further, outside
the Git SCM itself, nothing else should require knowledge of the location of the git binary,
or the plugin properties which control the SCM's configuration.
Provides access to the configuration for the git SCM.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
in 5.1 for removal without replacement in 6.0.
| |||||||||||
This method is deprecated.
in 5.1 for removal without replacement in 6.0.
| |||||||||||
Retrieves the path to the
git binary. | |||||||||||
Retrieves a path suitable for executing a
git-core binary, in a mutable list. | |||||||||||
This method is deprecated.
in 5.1 for removal without replacement in 6.0.
| |||||||||||
This method is deprecated.
in 5.1 for removal without replacement in 6.0.
| |||||||||||
This method is deprecated.
in 5.1 for removal without replacement in 6.0.
| |||||||||||
This method is deprecated.
in 5.1 for removal without replacement in 6.0.
| |||||||||||
This method is deprecated.
in 5.10 for removal in 6.0. Use
getVersion() instead.
| |||||||||||
Retrieves a
File denoting the absolute path to the objects directory within the specified
Repository's directory. | |||||||||||
Retrieves the named configuration property interpreted as a
boolean value. | |||||||||||
Retrieves the named configuration property interpreted as a
int value. | |||||||||||
Retrieves the named configuration property, defaulted if it has not been configured.
| |||||||||||
Retrieves the named configuration property.
| |||||||||||
Retrieves the named configuration property interpreted as a
long value. | |||||||||||
Retrieves a relative path from the root of one repository to another.
| |||||||||||
Retrieves a
File denoting the absolute path to the directory where all repositories are stored on disk. | |||||||||||
Retrieves a
File denoting the absolute path to the specified repository on disk. | |||||||||||
Retrieves a
File denoting the absolute path to a location on disk where temporary files created by the
git plugin are stored. | |||||||||||
This method is deprecated.
in 5.10 for removal in 6.0. Use
getVersion() instead.
| |||||||||||
This method is deprecated.
in 5.1 for removal without replacement in 6.0.
Determines the time (in seconds) that a git hosting process (e.g. git-http-backend for HTTP or git-upload-pack/git-receive-pack for SSH) is allowed to live, even if output is still being generated.
This method is deprecated.
in 5.1 for removal without replacement in 6.0.
Determines the time (in seconds) that a git hosting process (e.g. git-http-backend for HTTP or git-upload-pack/git-receive-pack for SSH) is allowed to live without generating any output.
Retrieves the path to the git binary.
| GitNotFoundException | if the git binary could not be found |
|---|---|
| GitUnsupportedVersionException | if the git binary was found but does not meet the
minimum version required
|
Retrieves a path suitable for executing a git-core binary, in a mutable list. Callers are free to append
additional command arguments to the returned list in constructing their commands.
Earlier versions of git used binaries which were stored in a libexec/git-core directory to do
much of their work. For example, executing git add would actually fork out git-add. Since then,
the functionality for most of these binaries has been compiled directly into git, with the files in the
libexec/git-core directory being replaced by symbolic links back to git.
However, some core binaries still exist, and are still external. One example is git-http-backend, which
is used to support push and pull operations over HTTP. When using such commands, there are scalability and
performance benefits associated with skipping the lead git http-backend process and dropping directly
to the git-http-backend binary that will actually be doing most of the work.
This method provides an abstraction for retrieving a core binary in libexec/git-core. Implementations
of this method are required to be aware of whether a core binary actually exists, and to not return an invalid
path when a request is made for a core binary that doesn't exist. However, implementations are free to simply
return the standard git binary at will. The only requirement is that they not return invalid paths.
| command | the core binary to retrieve |
|---|
| GitNotFoundException | if the git binary could not be found |
|---|---|
| NullPointerException | if the provided command is null |
| GitUnsupportedVersionException | if the git binary was found but does not meet the
minimum version required
|
This method is deprecated.
in 5.1 for removal without replacement in 6.0.
The minimum time in seconds between two garbage collection runs in a repository
This method is deprecated.
in 5.1 for removal without replacement in 6.0.
Determines the maximum amount of loose files that is allowed to exist in a repository, before triggering a garbage collection run on the next push.
This method is deprecated.
in 5.1 for removal without replacement in 6.0.
Determines the maximum amount of pack files that is allowed to exist in a repository, before triggering a garbage collection run on the next push.
This method is deprecated.
in 5.1 for removal without replacement in 6.0.
This method is deprecated.
in 5.10 for removal in 6.0. Use getVersion() instead.
Retrieves the version of the installed git binary, if an acceptable
version was found.
If git was not found, or is not an acceptable version, unlike #getVersion(), empty()
is returned instead of an exception being thrown.
git version, or empty() if git was not found or was not an
acceptable versionRetrieves a File denoting the absolute path to the objects directory within the specified
Repository's directory.
| repository | the repository to retrieve an objects path for |
|---|
objects directory| NullPointerException | if the provided repository is null
|
|---|
Retrieves the named configuration property interpreted as a boolean value.
| propertyName | the property to retrieve |
|---|---|
| defaultValue | the default value to be returned if the property is not configured |
| NullPointerException | if the provided propertyName is null
|
|---|
Retrieves the named configuration property interpreted as a int value.
| propertyName | the property to retrieve |
|---|---|
| defaultValue | the default value to be returned if the property is not configured |
| NullPointerException | if the provided propertyName is null
|
|---|
Retrieves the named configuration property, defaulted if it has not been configured.
| propertyName | the property to retrieve |
|---|---|
| defaultValue | the default value to be returned if the property is not configured |
| NullPointerException | if the provided propertyName or defaultValue is null
|
|---|
Retrieves the named configuration property.
| propertyName | the property to retrieve |
|---|
null if one is not configured| NullPointerException | if the provided propertyName is null
|
|---|
Retrieves the named configuration property interpreted as a long value.
| propertyName | the property to retrieve |
|---|---|
| defaultValue | the default value to be returned if the property is not configured |
| NullPointerException | if the provided propertyName is null
|
|---|
Retrieves a relative path from the root of one repository to another.
The intention of this method is to provide the shortest possible path between the two specified repositories. In general, that should be a relative path. However, in certain cases an absolute path may be shorter and, in such cases, this method will return the absolute path.
| repository | the destination repository |
|---|---|
| relativeTo | the starting repository |
Retrieves a File denoting the absolute path to the directory where all repositories are stored on disk.
While every repository will be in a subdirectory of the returned directory, callers should not make any
assumptions about how repository subdirectories will be laid out. That layout is an implementation detail and,
as such, is subject to change over time.
The returned File is guaranteed to exist, and to be a directory.
Retrieves a File denoting the absolute path to the specified repository on disk.
The returned File is not guaranteed to exist, but it is guaranteed to be a directory if it
does exist.
| repository | the repository to retrieve a path for |
|---|
| NullPointerException | if the provided repository is null
|
|---|
Retrieves a File denoting the absolute path to a location on disk where temporary files created by the
git plugin are stored.
This method is deprecated.
in 5.10 for removal in 6.0. Use getVersion() instead.
Retrieves the version of the current git binary, if an acceptable version
is installed. If git was not found, or if it is not an acceptable version, an exception is thrown.
This method should only be used after system startup is complete. For example, it should not be called
in constructors, as doing so may result in an exception that causes the plugin to fail to start. To do one-time
version checks in constructors, use getInstalledVersion() instead.
git version in use, if an acceptable version is installed; otherwise, an exception is thrown| GitNotFoundException | if the git binary could not be found |
|---|---|
| GitUnsupportedVersionException | if the git binary was found but does not meet the
MINIMUM_VERSION minimum version required |