@NotThreadSafe public interface GitScmCommandBuilder extends GitTypedCommandBuilder<GitScmCommandBuilder>
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.
ENV_AUTHOR_DATE, ENV_AUTHOR_EMAIL, ENV_AUTHOR_NAME, ENV_COMMITTER_DATE, ENV_COMMITTER_EMAIL, ENV_COMMITTER_NAME
alternate, alternates, alternates, author, author, author, commitish, committer, committer, committer, treeish, withConfiguration, withConfiguration, withConfiguration, withConfiguration
@Nonnull GitArchiveBuilder archive()
archive
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
git archive
command@Nonnull GitBlame blame()
blame
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull GitBranch branch()
branch
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull <T> GitCommand<T> build(@Nonnull com.atlassian.bitbucket.scm.CommandOutputHandler<T> outputHandler)
GitCommandBuilderSupport
the parent
interface
, mandates that built commands be GitCommands
, which support both synchronous
and asynchronous execution, rather than simple Commands
.build
in interface com.atlassian.bitbucket.scm.CommandBuilderSupport<GitScmCommandBuilder>
build
in interface GitCommandBuilderSupport<GitScmCommandBuilder>
build
in interface com.atlassian.bitbucket.scm.ScmCommandBuilder<GitScmCommandBuilder>
T
- The type of object, or object graph, which the output handler will process from the command's outputoutputHandler
- the handler to receive and process output from the command as it executes@Nonnull GitCatFile catFile()
catFile
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull GitCheckRefFormat checkRefFormat()
checkRefFormat
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
git check-ref-format
command@Nonnull GitCountObjectsBuilder countObjects()
countObjects
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull GitDiffBuilder diff()
diff
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull GitDiffTreeBuilder diffTree()
diffTree
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull GitFetchBuilder fetch()
fetch
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull GitForEachRefBuilder forEachRef()
forEachRef
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull GitFormatPatchBuilder formatPatch()
formatPatch
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
git format-patch
command@Nonnull GitLogBuilder log()
log
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull GitLsFilesBuilder lsFiles()
lsFiles
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull GitLsTreeBuilder lsTree()
lsTree
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull GitMergeBase mergeBase()
mergeBase
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull GitNotes notes()
notes
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull GitPackObjectsBuilder packObjects()
packObjects
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull GitPushBuilder push()
push
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull GitRevListBuilder revList()
revList
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull GitTag tag()
tag
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
git tag
command@Nonnull GitUpdateRef updateRef()
updateRef
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
@Nonnull com.atlassian.bitbucket.util.Version version()
GitTypedCommandBuilder
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.
version
in interface GitTypedCommandBuilder<GitScmCommandBuilder>
git
version in use, if an acceptable version is installed; otherwise, an exception is thrownCopyright © 2023 Atlassian. All rights reserved.