Interface GitTypedCommandBuilder<B extends GitTypedCommandBuilder<B>>
- All Superinterfaces:
com.atlassian.bitbucket.scm.CommandBuilder<B>,com.atlassian.bitbucket.scm.CommandBuilderSupport<B>,GitCommandBuilderSupport<B>,com.atlassian.bitbucket.scm.ScmCommandBuilder<B>
- All Known Subinterfaces:
GitScmCommandBuilder,GitWorkTreeCommandBuilder
ScmCommandBuilder with git-specific type-safe builders, to simplify using well-known
commands.
Type-safe builders are not provided for all of the commands supported by the git binary, and the builders
that are provided may not expose properties for all of the different arguments or argument combinations the command
offers. Free-form and type-safe builder semantics may not be mixed. If a type-safe builder does not exist for
the desired command, or it does not support the desired arguments, the free-form builder must be used instead.
For type-safe builders provided, the git command associated with the builder is used to name the interface
and the method. Note that some commands accept arguments which, when provided, enable the use of other arguments, or
trigger the command to produce significantly different output. For such commands, like blame and
cat-file, an interim interface is returned to allow the caller to choose the "mode" the command
will run in. Once a mode has been chosen, a builder will be returned exposing arguments supported for that mode.
- Since:
- 7.14
-
Field Summary
Fields inherited from interface com.atlassian.bitbucket.scm.git.command.GitCommandBuilderSupport
ENV_AUTHOR_DATE, ENV_AUTHOR_EMAIL, ENV_AUTHOR_NAME, ENV_COMMITTER_DATE, ENV_COMMITTER_EMAIL, ENV_COMMITTER_NAME -
Method Summary
Methods inherited from interface com.atlassian.bitbucket.scm.CommandBuilder
argument, argumentAfter, argumentAt, argumentBefore, clearArguments, clearInputHandler, defaultErrorHandler, errorHandler, inputHandler, rawArgument, rawArgumentAfter, rawArgumentAt, rawArgumentBeforeMethods inherited from interface com.atlassian.bitbucket.scm.CommandBuilderSupport
clearEnvironment, defaultExitHandler, exitHandler, removeEnvironment, withEnvironmentMethods inherited from interface com.atlassian.bitbucket.scm.git.command.GitCommandBuilderSupport
alternate, alternates, alternates, author, author, author, build, commitish, committer, committer, committer, treeish, withConfiguration, withConfiguration, withConfiguration, withConfigurationMethods inherited from interface com.atlassian.bitbucket.scm.ScmCommandBuilder
build, command
-
Method Details
-
archive
- Returns:
- a builder for the
git archivecommand
-
blame
-
branch
-
catFile
-
checkRefFormat
- Returns:
- a type-safe parent builder for the
git check-ref-formatcommand
-
countObjects
-
diff
-
diffTree
-
fetch
-
forEachRef
-
formatPatch
- Returns:
- a builder for the
git format-patchcommand
-
log
- Returns:
- the git log builder
-
lsFiles
-
lsTree
-
mergeBase
-
notes
-
packObjects
-
push
-
revList
-
tag
- Returns:
- a builder for the
git tagcommand
-
updateRef
-
version
@Nonnull com.atlassian.bitbucket.util.Version version()Retrieves theversionof the current git binary, if an acceptable version is installed. Ifgitwas 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.
- Returns:
- the
gitversion in use, if an acceptable version is installed; otherwise, an exception is thrown - Throws:
GitNotFoundException- if thegitbinary could not be foundGitUnsupportedVersionException- if thegitbinary was found but does not meet theMINIMUM_VERSION minimum versionrequired
-