|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jgit.api.GitCommand<T>
org.eclipse.jgit.api.TransportCommand<FetchCommand,FetchResult>
org.eclipse.jgit.api.FetchCommand
public class FetchCommand
A class used to execute a Fetch command. It has setters for all
supported options and arguments of this command and a call() method
to finally execute the command.
| Field Summary |
|---|
| Fields inherited from class org.eclipse.jgit.api.TransportCommand |
|---|
credentialsProvider, timeout, transportConfigCallback |
| Fields inherited from class org.eclipse.jgit.api.GitCommand |
|---|
repo |
| Constructor Summary | |
|---|---|
protected |
FetchCommand(Repository repo)
|
| Method Summary | |
|---|---|
FetchResult |
call()
Executes the fetch command with all the options and parameters
collected by the setter methods of this class. |
ProgressMonitor |
getProgressMonitor()
|
List<RefSpec> |
getRefSpecs()
|
String |
getRemote()
|
int |
getTimeout()
|
boolean |
isCheckFetchedObjects()
|
boolean |
isDryRun()
|
boolean |
isRemoveDeletedRefs()
|
boolean |
isThin()
|
FetchCommand |
setCheckFetchedObjects(boolean checkFetchedObjects)
If set to true, objects received will be checked for validity |
FetchCommand |
setDryRun(boolean dryRun)
Sets whether the fetch operation should be a dry run |
FetchCommand |
setProgressMonitor(ProgressMonitor monitor)
The progress monitor associated with the fetch operation. |
FetchCommand |
setRefSpecs(List<RefSpec> specs)
The ref specs to be used in the fetch operation |
FetchCommand |
setRefSpecs(RefSpec... specs)
The ref specs to be used in the fetch operation |
FetchCommand |
setRemote(String remote)
The remote (uri or name) used for the fetch operation. |
FetchCommand |
setRemoveDeletedRefs(boolean removeDeletedRefs)
If set to true, refs are removed which no longer exist in the source |
FetchCommand |
setTagOpt(TagOpt tagOpt)
Sets the specification of annotated tag behavior during fetch |
FetchCommand |
setThin(boolean thin)
Sets the thin-pack preference for fetch operation. |
| Methods inherited from class org.eclipse.jgit.api.TransportCommand |
|---|
configure, configure, self, setCredentialsProvider, setTimeout, setTransportConfigCallback |
| Methods inherited from class org.eclipse.jgit.api.GitCommand |
|---|
checkCallable, getRepository, setCallable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected FetchCommand(Repository repo)
repo - | Method Detail |
|---|
public FetchResult call()
throws JGitInternalException,
InvalidRemoteException
fetch command with all the options and parameters
collected by the setter methods of this class. Each instance of this
class should only be used for one invocation of the command (means: one
call to call())
FetchResult object representing the successful fetch
result
InvalidRemoteException - when called with an invalid remote uri
JGitInternalException - a low-level exception of JGit has occurred. The original
exception can be retrieved by calling
Throwable.getCause().public FetchCommand setRemote(String remote)
Constants.DEFAULT_REMOTE_NAME will
be used.
remote -
thisConstants.DEFAULT_REMOTE_NAMEpublic String getRemote()
public int getTimeout()
public boolean isCheckFetchedObjects()
public FetchCommand setCheckFetchedObjects(boolean checkFetchedObjects)
checkFetchedObjects -
thispublic boolean isRemoveDeletedRefs()
public FetchCommand setRemoveDeletedRefs(boolean removeDeletedRefs)
removeDeletedRefs -
thispublic ProgressMonitor getProgressMonitor()
public FetchCommand setProgressMonitor(ProgressMonitor monitor)
NullProgressMonitor
monitor -
thisNullProgressMonitorpublic List<RefSpec> getRefSpecs()
public FetchCommand setRefSpecs(RefSpec... specs)
specs -
thispublic FetchCommand setRefSpecs(List<RefSpec> specs)
specs -
thispublic boolean isDryRun()
public FetchCommand setDryRun(boolean dryRun)
dryRun -
thispublic boolean isThin()
public FetchCommand setThin(boolean thin)
thin -
thispublic FetchCommand setTagOpt(TagOpt tagOpt)
tagOpt -
this
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||