public class CloneCommand extends TransportCommand<CloneCommand,Git>
credentialsProvider, timeout, transportConfigCallbackrepo| Constructor and Description |
|---|
CloneCommand()
Create clone command with no repository set
|
| Modifier and Type | Method and Description |
|---|---|
Git |
call()
Executes the
Clone command. |
CloneCommand |
setBare(boolean bare) |
CloneCommand |
setBranch(String branch) |
CloneCommand |
setBranchesToClone(Collection<String> branchesToClone) |
CloneCommand |
setCloneAllBranches(boolean cloneAllBranches) |
CloneCommand |
setCloneSubmodules(boolean cloneSubmodules) |
CloneCommand |
setDirectory(File directory)
The optional directory associated with the clone operation.
|
CloneCommand |
setNoCheckout(boolean noCheckout) |
CloneCommand |
setProgressMonitor(ProgressMonitor monitor)
The progress monitor associated with the clone operation.
|
CloneCommand |
setRemote(String remote)
The remote name used to keep track of the upstream repository for the
clone operation.
|
CloneCommand |
setURI(String uri) |
configure, configure, self, setCredentialsProvider, setTimeout, setTransportConfigCallbackcheckCallable, getRepository, setCallablepublic Git call() throws GitAPIException, InvalidRemoteException, TransportException
Clone command.call in interface Callable<Git>call in class GitCommand<Git>Git object with associated repositoryInvalidRemoteExceptionTransportExceptionGitAPIExceptionpublic CloneCommand setURI(String uri)
uri - the uri to clone frompublic CloneCommand setDirectory(File directory)
directory - the directory to clone toURIish.getHumanishName()public CloneCommand setBare(boolean bare)
bare - whether the cloned repository is bare or notpublic CloneCommand setRemote(String remote)
Constants.DEFAULT_REMOTE_NAME will be used.remote - name that keeps track of the upstream repositoryConstants.DEFAULT_REMOTE_NAMEpublic CloneCommand setBranch(String branch)
branch - the initial branch to check out when cloning the repository.
Can be specified as ref name (refs/heads/master),
branch name (master) or tag name (v1.2.3).public CloneCommand setProgressMonitor(ProgressMonitor monitor)
NullProgressMonitormonitor - thisNullProgressMonitorpublic CloneCommand setCloneAllBranches(boolean cloneAllBranches)
cloneAllBranches - true when all branches have to be fetched (indicates wildcard
in created fetch refspec), false otherwise.thispublic CloneCommand setCloneSubmodules(boolean cloneSubmodules)
cloneSubmodules - true to initialize and update submodules. Ignored when
setBare(boolean) is set to true.thispublic CloneCommand setBranchesToClone(Collection<String> branchesToClone)
branchesToClone - collection of branches to clone. Ignored when allSelected is
true. Must be specified as full ref names (e.g.
refs/heads/master).thispublic CloneCommand setNoCheckout(boolean noCheckout)
noCheckout - if set to true no branch will be checked out
after the clone. This enhances performance of the clone
command when there is no need for a checked out branch.thisCopyright © 2014. All rights reserved.