Package org.jenkinsci.plugins.gitclient
Interface CloneCommand
- All Superinterfaces:
GitCommand
Command to clone a repository. This command behaves differently from CLI clone command, it never actually checks out
into the workspace.
-
Method Summary
Modifier and TypeMethodDescriptionWhen shallow cloning, allow for a depth to be set in cases where you need more than the immediate last commit.Deprecated.reference.List of refspecs to be retrieved by the fetch.repositoryName
(String name) Name of the remote, such as 'origin' (which is the default).shallow()
Deprecated.shallow
(boolean shallow) Only clone the most recent history, not preceding history.shared()
Deprecated.favourshared(boolean)
shared
(boolean shared) When the repository to clone is on the local machine, instead of using hard links, automatically setup .git/objects/info/alternates to share the objects with the source repositorytags
(boolean tags) Boolean which allows caller to request that tags and their references are not fetched.timeout.URL of the repository to be cloned.Methods inherited from interface org.jenkinsci.plugins.gitclient.GitCommand
execute
-
Method Details
-
url
URL of the repository to be cloned.- Parameters:
url
- aString
object.- Returns:
- a
CloneCommand
object.
-
repositoryName
Name of the remote, such as 'origin' (which is the default).- Parameters:
name
- aString
object.- Returns:
- a
CloneCommand
object.
-
shallow
Deprecated.favourshallow(boolean)
Only clone the most recent history, not preceding history. Depth of the shallow clone is controlled by the #depth method.- Returns:
- a
CloneCommand
object.
-
shallow
Only clone the most recent history, not preceding history. Depth of the shallow clone is controlled by the #depth method.- Parameters:
shallow
- boolean controlling whether the clone is shallow- Returns:
- a
CloneCommand
object. - Since:
- 2.5.0
-
reference
reference.- Parameters:
reference
- aString
object.- Returns:
- a
CloneCommand
object.
-
timeout
timeout.- Parameters:
timeout
- aInteger
object.- Returns:
- a
CloneCommand
object.
-
noCheckout
Deprecated.When we just need to clone repository without populating the workspace (for instance when sparse checkouts are used). This parameter does not do anything, a checkout will never be performed.- Returns:
- a
CloneCommand
object.
-
tags
Boolean which allows caller to request that tags and their references are not fetched. Default is to fetch tags when cloning.- Parameters:
tags
- boolean controlling whether tags are fetched- Returns:
- a
CloneCommand
object.
-
refspecs
List of refspecs to be retrieved by the fetch.- Parameters:
refspecs
- refspecs defining the references to be fetched- Returns:
- a
CloneCommand
object.
-
depth
When shallow cloning, allow for a depth to be set in cases where you need more than the immediate last commit. Has no effect if shallow is set to false (default).- Parameters:
depth
- number of revisions to be included in shallow clone- Returns:
- a
CloneCommand
object.
-
shallow(boolean)