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. | 
static BranchConfig.BranchRebaseMode | 
getRebaseMode(String branchName,
             Config config)
Reads the rebase mode to use for a pull command from the repository
 configuration. 
 | 
String | 
getRemote()  | 
String | 
getRemoteBranchName()  | 
PullCommand | 
setProgressMonitor(ProgressMonitor monitor)  | 
PullCommand | 
setRebase(boolean useRebase)
Set if rebase should be used after fetching. 
 | 
PullCommand | 
setRebase(BranchConfig.BranchRebaseMode rebaseMode)
Sets the  
BranchConfig.BranchRebaseMode to use 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 PullCommand setRebase(BranchConfig.BranchRebaseMode rebaseMode)
BranchConfig.BranchRebaseMode to use after fetching.
 --rebase on the command line: use rebase
 instead of merge after fetching.--preserve-merges on the command line: rebase
 preserving local merge commits.--interactive on the command line: use
 interactive rebase.--no-rebase: merge instead of rebasing.
 nullbranch.[name].rebase or, if not set, pull.rebase
 A branch can be configured to use rebase by default. See
 branch.[name].rebase, branch.autosetuprebase, and
 pull.rebase.
rebaseMode - the BranchConfig.BranchRebaseMode to usethispublic PullResult call() throws GitAPIException, WrongRepositoryStateException, InvalidConfigurationException, DetachedHeadException, InvalidRemoteException, CanceledException, RefNotFoundException, RefNotAdvertisedException, 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>WrongRepositoryStateExceptionInvalidConfigurationExceptionDetachedHeadExceptionInvalidRemoteExceptionCanceledExceptionRefNotFoundExceptionRefNotAdvertisedExceptionNoHeadExceptionTransportExceptionGitAPIExceptionpublic 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.thispublic static BranchConfig.BranchRebaseMode getRebaseMode(String branchName, Config config)
branch.[branchName].rebase, or,if not set, pull.rebase.
 If neither is set, yields BranchConfig.BranchRebaseMode.NONE.branchName - name of the local branchconfig - the Config to read the value fromBranchConfig.BranchRebaseModeCopyright © 2016 Eclipse JGit Project. All rights reserved.