Class CloneGitRepo
- java.lang.Object
-
- org.jclouds.scriptbuilder.statements.git.CloneGitRepo
-
- All Implemented Interfaces:
Statement
public class CloneGitRepo extends Object implements Statement
Clones a gitRepoAndRef into a newly created directory, creates remote-tracking branches for each branch in the cloned gitRepoAndRef (visible using git branch -r), and creates and checks out an initial branch that is forked from the cloned gitRepoAndRef's currently active branch. PWD is set to the directory being checked out.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCloneGitRepo.Builder
-
Field Summary
Fields Modifier and Type Field Description protected com.google.common.base.Optional<String>directoryprotected GitRepoAndRefgitRepoAndRef
-
Constructor Summary
Constructors Modifier Constructor Description protectedCloneGitRepo(GitRepoAndRef gitRepoAndRef, com.google.common.base.Optional<String> directory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CloneGitRepo.Builderbuilder()booleanequals(Object obj)Iterable<String>functionDependencies(OsFamily arg0)com.google.common.base.Optional<String>getDirectory()The name of a new directory to clone into.GitRepoAndRefgetGitRepoAndRef()The coordinates to checkoutinthashCode()Stringrender(OsFamily arg0)CloneGitRepo.BuildertoBuilder()StringtoString()
-
-
-
Field Detail
-
gitRepoAndRef
protected final GitRepoAndRef gitRepoAndRef
-
directory
protected final com.google.common.base.Optional<String> directory
-
-
Constructor Detail
-
CloneGitRepo
protected CloneGitRepo(GitRepoAndRef gitRepoAndRef, com.google.common.base.Optional<String> directory)
-
-
Method Detail
-
builder
public static CloneGitRepo.Builder builder()
-
toBuilder
public CloneGitRepo.Builder toBuilder()
-
getGitRepoAndRef
public GitRepoAndRef getGitRepoAndRef()
The coordinates to checkout
-
getDirectory
public com.google.common.base.Optional<String> getDirectory()
The name of a new directory to clone into. The "humanish" part of the source gitRepoAndRef is used if no directory is explicitly given (repo for /path/to/repo.git and foo for host.xz:foo/.git).
-
functionDependencies
public Iterable<String> functionDependencies(OsFamily arg0)
- Specified by:
functionDependenciesin interfaceStatement
-
-