Interface GitWorkTreeCommandBuilder
- All Superinterfaces:
com.atlassian.bitbucket.scm.CommandBuilder<GitWorkTreeCommandBuilder>,com.atlassian.bitbucket.scm.CommandBuilderSupport<GitWorkTreeCommandBuilder>,GitCommandBuilderSupport<GitWorkTreeCommandBuilder>,GitTypedCommandBuilder<GitWorkTreeCommandBuilder>,com.atlassian.bitbucket.scm.ScmCommandBuilder<GitWorkTreeCommandBuilder>
GitScmCommandBuilder with type-safe builders for commands supported in
work trees.
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.
- 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
Modifier and TypeMethodDescriptionadd()<T> GitCommand<T>build(com.atlassian.bitbucket.scm.CommandOutputHandler<T> outputHandler) Builds aGitCommandwhich, whenexecuted, will provide output to the providedoutputHandlerfor processing.commit()config()merge()mv()Creates a builder for thegit mvcommand.remote()reset()rm()status()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, commitish, committer, committer, committer, treeish, withConfiguration, withConfiguration, withConfiguration, withConfigurationMethods inherited from interface com.atlassian.bitbucket.scm.git.command.GitTypedCommandBuilder
archive, blame, branch, catFile, checkRefFormat, countObjects, diff, diffTree, fetch, forEachRef, formatPatch, log, lsFiles, lsTree, mergeBase, notes, packObjects, push, revList, tag, updateRef, versionMethods inherited from interface com.atlassian.bitbucket.scm.ScmCommandBuilder
command
-
Method Details
-
add
-
build
@Nonnull <T> GitCommand<T> build(@Nonnull com.atlassian.bitbucket.scm.CommandOutputHandler<T> outputHandler) Builds aGitCommandwhich, whenexecuted, will provide output to the providedoutputHandlerfor processing.- Specified by:
buildin interfacecom.atlassian.bitbucket.scm.CommandBuilderSupport<GitWorkTreeCommandBuilder>- Specified by:
buildin interfaceGitCommandBuilderSupport<GitWorkTreeCommandBuilder>- Specified by:
buildin interfacecom.atlassian.bitbucket.scm.ScmCommandBuilder<GitWorkTreeCommandBuilder>- Type Parameters:
T- type for the builder- Parameters:
outputHandler- the handler to receive and process output from the command as it executes- Returns:
- the built command
- Throws:
NullPointerException- if the providedoutputHandlerisnull
-
commit
-
config
-
merge
-
mv
Creates a builder for thegit mvcommand.Note that
git mvcan only be used inGitCheckoutType.NONEwork trees, and only when the source path is first checked out usinggit checkout HEAD -- <path>.In
sparsecheckouts,git mvfails when the source or destination paths are not included in the sparse checkout patterns, which cannot be controlled through the work tree API at this time. Forsparsecheckouts, use a combination ofgit rm,GitWorkTree.write(String, Charset, IoConsumer)andgit addinstead.- Returns:
- a builder for
git mvoperations
-
remote
-
reset
-
rm
-
status
-