public class PullCommand extends TransportCommand<PullCommand,PullResult>
credentialsProvider, timeout, transportConfigCallbackrepo| 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, setTransportConfigCallbackcheckCallable, getRepository, setCallableprotected 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 - thispublic 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>WrongRepositoryStateExceptionInvalidConfigurationExceptionDetachedHeadExceptionInvalidRemoteExceptionCanceledExceptionRefNotFoundExceptionNoHeadExceptionTransportExceptionGitAPIExceptionpublic PullCommand setRemote(String remote)
Constants.DEFAULT_REMOTE_NAME will be used.remote - thisConstants.DEFAULT_REMOTE_NAMEpublic PullCommand setRemoteBranchName(String remoteBranchName)
remoteBranchName - thispublic String getRemote()
public String getRemoteBranchName()
public PullCommand setStrategy(MergeStrategy strategy)
strategy - The merge strategy to use during this pull operation.thisCopyright © 2014. All rights reserved.