Package com.atlassian.bitbucket.scm.git
Interface GitScm
- All Superinterfaces:
com.atlassian.bitbucket.scm.Scm
public interface GitScm
extends com.atlassian.bitbucket.scm.Scm
Provides functionality for interacting with Git repositories, exposing factories which can be used to retrieve
ready-built commands for performing well-known operations as well as a
builder
factory which can be used to assemble custom commands.
Where possible, plugin developers are strongly encouraged to use top-level services to interface with the SCM, rather than coding directly to the SCM tier. Using the top-level services provides better support for multiple SCMs, as well as providing additional functionality to augment what the SCMs provide. In general, most of the functionality provided by the Git SCM is better accessed via the following services:
CommitServiceCompareServiceContentServicePullRequestServiceRefServiceRepositoryService
SCM ID on the repository before
attempting to run Git commands against it.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncom.atlassian.bitbucket.scm.PluginMergeStrategiescom.atlassian.bitbucket.util.VersionOptional<com.atlassian.bitbucket.util.Version>Methods inherited from interface com.atlassian.bitbucket.scm.Scm
getDefaultBranch, getFeatures, getId, getMirrorCommandFactory, getName, getStatus, isEmpty
-
Field Details
-
ID
- See Also:
-
NAME
- See Also:
-
-
Method Details
-
getBulkContentCommandFactory
- Specified by:
getBulkContentCommandFactoryin interfacecom.atlassian.bitbucket.scm.Scm- Returns:
- a command factory providing support for bulk operations
-
getCommandBuilderFactory
- Specified by:
getCommandBuilderFactoryin interfacecom.atlassian.bitbucket.scm.Scm- Returns:
- a factory for creating builders, used to assemble custom commands using either free-form arguments
or type-safe wrappers around
gitcommands likediffandrev-list
-
getCommandFactory
- Specified by:
getCommandFactoryin interfacecom.atlassian.bitbucket.scm.Scm- Returns:
- a command factory providing standard SCM functionality, like the ability to list branches or diff two commits
-
getCompareCommandFactory
- Specified by:
getCompareCommandFactoryin interfacecom.atlassian.bitbucket.scm.Scm- Returns:
- a command factory for comparing refs within and between repositories
-
getExtendedCommandFactory
- Specified by:
getExtendedCommandFactoryin interfacecom.atlassian.bitbucket.scm.Scm- Returns:
- a command factory providing extended SCM functionality
- Since:
- 4.6
-
getIntegrityCheckCommandFactory
- Specified by:
getIntegrityCheckCommandFactoryin interfacecom.atlassian.bitbucket.scm.Scm- Returns:
- a command factory to perform integrity checks
- Since:
- 4.12
- See Also:
-
Scm.getIntegrityCheckCommandFactory()
-
getMergeStrategies
@Nonnull com.atlassian.bitbucket.scm.PluginMergeStrategies getMergeStrategies()- Specified by:
getMergeStrategiesin interfacecom.atlassian.bitbucket.scm.Scm- Returns:
- a set of merge strategies supported by the Git SCM
- Since:
- 4.9
-
getMinimumVersion
@Nonnull com.atlassian.bitbucket.util.Version getMinimumVersion()- Returns:
- the minimum supported
gitversion.
-
getPullRequestCommandFactory
- Specified by:
getPullRequestCommandFactoryin interfacecom.atlassian.bitbucket.scm.Scm- Returns:
- a command factory for displaying and merging pull requests within and between repositories
-
getRefCommandFactory
- Specified by:
getRefCommandFactoryin interfacecom.atlassian.bitbucket.scm.Scm- Returns:
- a command factory for mutating refs
-
getVersion
Retrieves thegitversion, if anacceptable versionwas found. Ifgitwas not found, or is not an acceptable version,empty()is returned.- Returns:
- the
gitversion, orempty()ifgitwas not found or was not an acceptable version - Since:
- 5.10
-
getWorkTreeBuilderFactory
- Returns:
- a factory providing support for creating
work trees. - Since:
- 7.14
- See Also:
-