public class PullCommand extends TransportCommand<PullCommand,PullResult>
credentialsProvider, timeout, transportConfigCallback
repo
Modifier | Constructor and Description |
---|---|
protected |
PullCommand(Repository repo) |
Modifier and Type | Method and Description |
---|---|
PullResult |
call()
Executes the
Pull command with all the options and parameters
collected by the setter methods (e.g. |
String |
getRemote() |
String |
getRemoteBranchName() |
PullCommand |
setProgressMonitor(ProgressMonitor monitor) |
PullCommand |
setRebase(boolean useRebase)
Set if rebase should be used after fetching.
|
PullCommand |
setRemote(String remote)
The remote (uri or name) to be used for the pull operation.
|
PullCommand |
setRemoteBranchName(String remoteBranchName)
The remote branch name to be used for the pull operation.
|
PullCommand |
setStrategy(MergeStrategy strategy) |
configure, configure, self, setCredentialsProvider, setTimeout, setTransportConfigCallback
checkCallable, getRepository, setCallable
protected PullCommand(Repository repo)
repo
- public PullCommand setProgressMonitor(ProgressMonitor monitor)
monitor
- a progress monitorpublic PullCommand setRebase(boolean useRebase)
If set to false, merge is used after fetching, overriding the configuration file. This is equivalent to --no-rebase on the command line.
This setting overrides the settings in the configuration file. By default, the setting in the repository configuration file is used.
A branch can be configured to use rebase by default. See branch.[name].rebase and branch.autosetuprebase.
useRebase
- this
public PullResult call() throws GitAPIException, WrongRepositoryStateException, InvalidConfigurationException, DetachedHeadException, InvalidRemoteException, CanceledException, RefNotFoundException, NoHeadException, TransportException
Pull
command with all the options and parameters
collected by the setter methods (e.g.
setProgressMonitor(ProgressMonitor)
) of this class. Each
instance of this class should only be used for one invocation of the
command. Don't call this method twice on an instance.call
in interface Callable<PullResult>
call
in class GitCommand<PullResult>
WrongRepositoryStateException
InvalidConfigurationException
DetachedHeadException
InvalidRemoteException
CanceledException
RefNotFoundException
NoHeadException
TransportException
GitAPIException
public PullCommand setRemote(String remote)
Constants.DEFAULT_REMOTE_NAME
will be used.remote
- this
Constants.DEFAULT_REMOTE_NAME
public PullCommand setRemoteBranchName(String remoteBranchName)
remoteBranchName
- this
public String getRemote()
public String getRemoteBranchName()
public PullCommand setStrategy(MergeStrategy strategy)
strategy
- The merge strategy to use during this pull operation.this
Copyright © 2015. All rights reserved.