Interface GitFetchBuilder
- All Superinterfaces:
com.atlassian.bitbucket.scm.CommandBuilderSupport<GitFetchBuilder>
,GitCommandBuilderSupport<GitFetchBuilder>
A builder which can be used to construct a
command
for running
git fetch
.-
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 TypeMethodDescriptionatomic
(boolean value) Specifies whether the fetch should update the refs atomically (i.e.Clears anyrefspecs
which have been added, allowing the same builder to be reused when constructing multiple fetches for different refs.errorHandler
(com.atlassian.bitbucket.scm.CommandErrorHandler value) force
(boolean value) progress
(boolean value) prune
(boolean value) Specifies whether to supply--prune
to prune local branches and tags where the upstream branch or tag has been deleted.quiet
(boolean value) repository
(com.atlassian.bitbucket.repository.Repository value) Specifies which upstream repository to fetch from.repository
(String value) tags
(GitFetchTagMode value) Specifies--tags
or--no-tags
, to control whethergit fetch
fetches tags, and which tags it fetches.Methods inherited from interface com.atlassian.bitbucket.scm.CommandBuilderSupport
clearEnvironment, defaultExitHandler, exitHandler, removeEnvironment, withEnvironment
Methods 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, withConfiguration
-
Method Details
-
atomic
Specifies whether the fetch should update the refs atomically (i.e. all or nothing).- Returns:
this
- Since:
- 8.0
-
clearRefspecs
Clears anyrefspecs
which have been added, allowing the same builder to be reused when constructing multiple fetches for different refs.- Returns:
this
-
errorHandler
@Nonnull GitFetchBuilder errorHandler(@Nonnull com.atlassian.bitbucket.scm.CommandErrorHandler value) Registers the providederror handler
to receivestderr
output when the builtcommand
is run.git fetch
outputs the refs that are updated tostderr
, notstdout
, so in order to parse the refs that change callers must register an error handler, not an output handler.- Parameters:
value
- the handler to receivestderr
output- Returns:
this
-
force
-
progress
-
prune
Specifies whether to supply--prune
to prune local branches and tags where the upstream branch or tag has been deleted.- Parameters:
value
-true
if local refs which do not exist upstream should be pruned; otherwisefalse
to leave such refs in place- Returns:
this
- Since:
- 4.1
-
quiet
-
refspec
-
refspecs
-
refspecs
-
repository
Specifies which upstream repository to fetch from.- Parameters:
value
- the repository to fetch from- Returns:
this
- Since:
- 5.12
-
repository
-
tags
Specifies--tags
or--no-tags
, to control whethergit fetch
fetches tags, and which tags it fetches.- Parameters:
value
- the tag mode for the command- Returns:
this
-