public class LsRemoteCommand extends TransportCommand<LsRemoteCommand,Collection<Ref>>
credentialsProvider, timeout, transportConfigCallback
repo
Constructor and Description |
---|
LsRemoteCommand(Repository repo) |
Modifier and Type | Method and Description |
---|---|
Collection<Ref> |
call()
Executes the
LsRemote command with all the options and parameters
collected by the setter methods (e.g. |
void |
setHeads(boolean heads)
Include refs/heads in references results
|
LsRemoteCommand |
setRemote(String remote)
The remote (uri or name) used for the fetch operation.
|
void |
setTags(boolean tags)
Include refs/tags in references results
|
void |
setUploadPack(String uploadPack)
The full path of git-upload-pack on the remote host
|
configure, configure, self, setCredentialsProvider, setTimeout, setTransportConfigCallback
checkCallable, getRepository, setCallable
public LsRemoteCommand(Repository repo)
repo
- public LsRemoteCommand setRemote(String remote)
Constants.DEFAULT_REMOTE_NAME
will
be used.remote
- this
Constants.DEFAULT_REMOTE_NAME
public void setHeads(boolean heads)
heads
- public void setTags(boolean tags)
tags
- public void setUploadPack(String uploadPack)
uploadPack
- public Collection<Ref> call() throws GitAPIException, JGitInternalException
LsRemote
command with all the options and parameters
collected by the setter methods (e.g. setHeads(boolean)
) 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.InvalidRemoteException
- when called with an invalid remote uriJGitInternalException
- a low-level exception of JGit has occurred. The original
exception can be retrieved by calling
Throwable.getCause()
.GitAPIException
Copyright © 2012. All Rights Reserved.